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

Hotfix: promise rejection configuration #2239

Merged
merged 6 commits into from
Oct 25, 2024

Conversation

gingerbenw
Copy link
Member

@gingerbenw gingerbenw commented Oct 24, 2024

Goal

Ensure reportUnhandledPromiseRejectionsAsHandled config options is correctly handled and tested in react-native

Testing

Add unit tests for react-native to ensure configuration (and typescript definitions) handle new config value

@gingerbenw gingerbenw marked this pull request as ready for review October 24, 2024 09:14
@gingerbenw gingerbenw changed the title Hotfix promise rejection configuration Hotfix: promise rejection configuration Oct 24, 2024
Copy link

github-actions bot commented Oct 24, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 45.89 kB 13.78 kB
After 45.89 kB 13.78 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 14a93ed

Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 40 to 51
Scenario: reporting unhandled promise rejections as handled
And I run the service "unhandled" with the command "node scenarios/unhandled-promise-rejection-as-handled"
And I wait to receive an error
Then the error is valid for the error reporting API version "4" for the "Bugsnag Node" notifier
And the event "unhandled" is true
And the event "unhandled" is false
And the event "severity" equals "error"
And the event "severityReason.type" equals "unhandledPromiseRejection"
And the exception "errorClass" equals "Error"
And the exception "message" equals "not handled"
And the exception "type" equals "nodejs"
And the "file" of stack frame 0 equals "scenarios/unhandled-promise-rejection.js"
And the "file" of stack frame 0 equals "scenarios/unhandled-promise-rejection-as-handled.js"
And the "lineNumber" of stack frame 0 equals 10
Copy link
Member Author

@gingerbenw gingerbenw Oct 24, 2024

Choose a reason for hiding this comment

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

This was previously a duplicate of the scenario above, hence rewriting and not adding a new one

@yousif-bugsnag
Copy link
Contributor

is there a reason we haven't added a scenario for React Native?

@gingerbenw
Copy link
Member Author

@yousif-bugsnag just that we've covered it with unit tests - but it wouldn't hurt to add one I suppose!

@gingerbenw gingerbenw merged commit 7f1d209 into next Oct 25, 2024
59 checks passed
@gingerbenw gingerbenw deleted the hotfix/promise-rejection-configuration branch October 25, 2024 08:15
@gingerbenw gingerbenw mentioned this pull request Oct 25, 2024
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