You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to apply a file that does not exists, we have the whole java stack trace as a result.
Suggestion
Perhaps, we can replace it by an explicit and easy to understand message.
Additional Context
kafkactl apply -f myfile
java.lang.RuntimeException: java.nio.file.NoSuchFileException: myfile
at com.michelin.kafkactl.service.FileService.lambda$parseResourceListFromFiles$0(FileService.java:46)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
at com.michelin.kafkactl.service.FileService.parseResourceListFromFiles(FileService.java:50)
at com.michelin.kafkactl.service.ResourceService.parseResources(ResourceService.java:443)
at com.michelin.kafkactl.command.Apply.onAuthSuccess(Apply.java:60)
at com.michelin.kafkactl.hook.AuthenticatedHook.onContextValid(AuthenticatedHook.java:47)
at com.michelin.kafkactl.hook.DryRunHook.onContextValid(DryRunHook.java:21)
at com.michelin.kafkactl.hook.ValidCurrentContextHook.call(ValidCurrentContextHook.java:37)
at com.michelin.kafkactl.hook.ValidCurrentContextHook.call(ValidCurrentContextHook.java:18)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at io.micronaut.configuration.picocli.PicocliRunner.execute(PicocliRunner.java:226)
at io.micronaut.configuration.picocli.PicocliRunner.execute(PicocliRunner.java:188)
at com.michelin.kafkactl.Kafkactl.main(Kafkactl.java:82)
Caused by: java.nio.file.NoSuchFileException: myfile
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:261)
at java.base/java.nio.file.Files.newByteChannel(Files.java:379)
at java.base/java.nio.file.Files.newByteChannel(Files.java:431)
at java.base/java.nio.file.Files.readAllBytes(Files.java:3268)
at java.base/java.nio.file.Files.readString(Files.java:3346)
at java.base/java.nio.file.Files.readString(Files.java:3305)
at com.michelin.kafkactl.service.FileService.lambda$parseResourceListFromFiles$0(FileService.java:43)
... 28 more
The text was updated successfully, but these errors were encountered:
Problem
When trying to apply a file that does not exists, we have the whole java stack trace as a result.
Suggestion
Perhaps, we can replace it by an explicit and easy to understand message.
Additional Context
The text was updated successfully, but these errors were encountered: