Skip to content
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

fix: Use validated exception data in dispatchError. #562

Merged

Conversation

kinyoklion
Copy link
Member

No description provided.

@kinyoklion kinyoklion force-pushed the rlamb/additional-safety-checking branch from 39b9ac6 to 956156f Compare September 3, 2024 19:36
message: exception.message,
type: exception.name || exception.constructor?.name || GENERIC_EXCEPTION,
// Only coalesce null/undefined, not empty.
message: exception.message ?? MISSING_MESSAGE,
Copy link
Member Author

Choose a reason for hiding this comment

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

In practice this shouldn't happen, but may was well be ultra safe.

stack: { frames: [] },
breadcrumbs: [...this.breadcrumbs],
sessionId: this.sessionId,
};
this.capture(ERROR_KEY, data);
this.dispatchError(exception);
this.dispatchError(data);
Copy link
Member Author

Choose a reason for hiding this comment

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

This will have the already checked type and message.

@kinyoklion kinyoklion marked this pull request as ready for review September 3, 2024 19:37
@kinyoklion kinyoklion requested a review from a team as a code owner September 3, 2024 19:37
@erangeles erangeles self-requested a review September 3, 2024 19:38
@kinyoklion kinyoklion merged commit 9f6710f into feat/proto-client-telemetry Sep 3, 2024
20 checks passed
@kinyoklion kinyoklion deleted the rlamb/additional-safety-checking branch September 3, 2024 19:39
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