Skip to content

Comments

Improve error model and serialization#44

Open
Quinn-With-Two-Ns wants to merge 1 commit intonexus-rpc:mainfrom
Quinn-With-Two-Ns:nexus-error-changes
Open

Improve error model and serialization#44
Quinn-With-Two-Ns wants to merge 1 commit intonexus-rpc:mainfrom
Quinn-With-Two-Ns:nexus-error-changes

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

Improve error model and serialization:

  • Add stack trace to FailureInfo
  • Allow OperationException to have a message
  • Allow HandlerException to have a message
  • Deprecate old constructors for HandlerException

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner February 17, 2026 18:25
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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() {

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant