Skip to content

Nexus error chain workaround #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 7, 2025
Merged

Nexus error chain workaround #944

merged 4 commits into from
Jul 7, 2025

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