Skip to content

Show a better error message when the .proto descriptor is not available#1493

Open
mcruzdev wants to merge 1 commit into
serverlessworkflow:mainfrom
mcruzdev:issue-1492
Open

Show a better error message when the .proto descriptor is not available#1493
mcruzdev wants to merge 1 commit into
serverlessworkflow:mainfrom
mcruzdev:issue-1492

Conversation

@mcruzdev

Copy link
Copy Markdown
Collaborator

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:

Special notes for reviewers:

Additional information (if needed):

Closes #1492

Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
@mcruzdev mcruzdev requested a review from fjtirado as a code owner June 26, 2026 18:15
Copilot AI review requested due to automatic review settings June 26, 2026 18:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the failure mode when a gRPC .proto descriptor resource cannot be opened (previously resulting in a bare NullPointerException), aligning with issue #1492.

Changes:

  • Add an explicit null-check for the InputStream returned by ExternalResourceHandler.open().
  • Throw a clearer exception message when the .proto descriptor resource is unavailable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to +49
if (inputStream == null) {
throw new IllegalStateException(
"Could not read gRPC proto descriptor resource '"
+ externalResourceHandler.name()
+ "'. Verify the path is correct and that the resource is available.");
}
Comment on lines +49 to 53
}

Path protoFile = grpcDir.resolve(externalResourceHandler.name());
if (!Files.exists(protoFile)) {
Files.createDirectories(protoFile);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a better message error when the proto descriptor is not available

2 participants