Skip to content

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented Jul 7, 2025

Inject an additional error into the cause chain to work around the fact that HandlerError is an independent exception with its own error message and stack trace (unlike Go and Java).

@dandavison dandavison requested a review from a team as a code owner July 7, 2025 21:16
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Approved with a comment.

# but it should be "runtime-error-message"
# "message": "runtime-error-message",
"message": "handler-error-message",
"type": "nexusrpc._common.HandlerError",
Copy link
Member

Choose a reason for hiding this comment

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

I think you can drop the type here.

@dandavison dandavison merged commit dcb1686 into nexus Jul 7, 2025
2 of 13 checks passed
@dandavison dandavison deleted the nexus-error-chains branch July 7, 2025 22:04
dandavison added a commit that referenced this pull request Jul 8, 2025
* Always move first error message to top-level
* Inject ApplicationError
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.

2 participants