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: Conditionally access constructor name. #561

Conversation

kinyoklion
Copy link
Member

No description provided.

} : {
type: 'generic',
message: 'null or undefined exception',
stack: { frames: [] },
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately it doesn't appear that we can get a stack for "throw null" or "throw undefined".


const data: ErrorData = validException
? {
type: exception.name || exception.constructor?.name || 'generic',
Copy link
Member Author

Choose a reason for hiding this comment

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

Theoretically the constructor should not be able to be null or undefined, but potentially it could be with some prototype pollution.

@kinyoklion kinyoklion marked this pull request as ready for review September 3, 2024 17:06
@kinyoklion kinyoklion requested a review from a team as a code owner September 3, 2024 17:07
@kinyoklion kinyoklion merged commit 326295f into feat/proto-client-telemetry Sep 3, 2024
20 checks passed
@kinyoklion kinyoklion deleted the rlamb/telemetry-conditional-constructor-name branch September 3, 2024 18:05
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.

3 participants