Improve error model and serialization#44
Improve error model and serialization#44Quinn-With-Two-Ns wants to merge 1 commit intonexus-rpc:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b7fcca303
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| /** Failure stack trace. */ | ||
| public String getStackTrace() { |
There was a problem hiding this comment.
Annotate FailureInfo stack trace as nullable
io.nexusrpc is @NullMarked (see package-info.java), so getStackTrace() currently advertises a non-null return type, but Builder#setStackTrace accepts null and build() also leaves it unset by default (covered by FailureInfoTest.builderWithoutStackTrace). This creates FailureInfo instances whose stackTrace is null despite a non-null API contract, so callers that trust the signature can dereference it and hit runtime NPEs.
Useful? React with 👍 / 👎.
3b7fcca to
0d96ba5
Compare
Improve error model and serialization:
OperationExceptionto have a messageHandlerExceptionto have a messageHandlerException