{"record":{"id":"3e2da6ad31bff610","repo":"quarkusio/quarkus","slug":"runtimeexception-e-3e2da6","errorCode":null,"errorMessage":"RuntimeException(e)","messagePattern":"RuntimeException\\(e\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/grpc/cli/src/main/java/io/quarkus/grpc/cli/DescribeCommand.java","lineNumber":38,"sourceCode":"    }\n\n    @Override\n    protected void execute(MutinyServerReflectionGrpc.MutinyServerReflectionStub stub) {\n        ServerReflectionRequest request = ServerReflectionRequest\n                .newBuilder()\n                .setFileContainingSymbol(unmatched.get(1))\n                .build();\n        Multi<ServerReflectionResponse> response = stub.serverReflectionInfo(Multi.createFrom().item(request));\n        response.toUni().map(r -> {\n            List<ByteString> list = r.getFileDescriptorResponse().getFileDescriptorProtoList();\n            for (ByteString bs : list) {\n                try {\n                    DescriptorProtos.FileDescriptorProto fdp = DescriptorProtos.FileDescriptorProto.parseFrom(bs);\n                    log(JsonFormat.printer().print(fdp));\n                } catch (RuntimeException e) {\n                    throw e;\n                } catch (Exception e) {\n                    throw new RuntimeException(e);\n                }\n            }\n            return null;\n        }).await().indefinitely();\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":45,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/grpc/cli/src/main/java/io/quarkus/grpc/cli/DescribeCommand.java#L20-L45","documentation":"quarkus grpc describe command reads the served FileDescriptorProto bytes and pretty-prints them with JsonFormat. Any checked exception during parsing or printing is rethrown as an unchecked RuntimeException(e) so the picocli command aborts with a stack trace. The root cause is preserved as the cause.","triggerScenarios":"Running `quarkus grpc describe <service>` against a server whose descriptor bytes are corrupt/unparseable (parseFrom fails), or JsonFormat.printer().print(fdp) fails on an unexpected proto configuration.","commonSituations":"Pointing the CLI at a non-gRPC-reflection endpoint that returns garbage bytes; TLS/proxy tampering with the response; mismatched protobuf runtime versions between CLI and server.","solutions":["Inspect the caused-by stack trace to find the real parse/print error","Verify the target server supports gRPC server reflection and the host/port are correct","Retry the command against a known-good service to rule out environment/proxy issues"],"exampleFix":"// before\n} catch (Exception e) {\n    throw new RuntimeException(e);\n}\n// after\n} catch (Exception e) {\n    throw new RuntimeException(\"Failed to describe service: invalid descriptor from server\", e);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    quarkus.grpc.describe MyService;\n} catch (RuntimeException e) {\n    Throwable root = e;\n    while (root.getCause() != null) root = root.getCause();\n    System.err.println(\"describe failed: \" + root.getMessage());\n}","preventionTips":["Confirm the target server supports gRPC server reflection (grpcurl -plaintext host:port list)","Connect directly to the gRPC port, avoiding proxies that corrupt payloads","Keep the Quarkus CLI and protobuf runtime versions aligned with the server"],"tags":["grpc","cli","protobuf-parsing"],"backgroundTag":"protobuf-descriptor-parse-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}