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

reportUnhandledPromiseRejectionsAsHandled #2225

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

gingerbenw
Copy link
Member

@gingerbenw gingerbenw commented Oct 16, 2024

Goal

To be able to manually set unhandled promise rejections to be considered handled to improve stability score

Changeset

Add new reportUnhandledPromiseRejectionsAsHandled config option

Testing

Added new unit tests

@gingerbenw gingerbenw changed the title Add new reportUnhandledPromiseRejectionsAsHandled co… reportUnhandledPromiseRejectionsAsHandled Oct 16, 2024
Copy link

github-actions bot commented Oct 16, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 45.76 kB 13.77 kB
After 45.97 kB 13.82 kB
± ⚠️ +206 bytes ⚠️ +52 bytes

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 17c27a1

@gingerbenw gingerbenw marked this pull request as ready for review October 16, 2024 14:05
@gingerbenw gingerbenw merged commit 6e2e6dc into next Oct 17, 2024
59 checks passed
@gingerbenw gingerbenw deleted the PLAT-12915/unhandled-promise-rejection-config branch October 17, 2024 07:59
@gingerbenw gingerbenw mentioned this pull request Oct 22, 2024
@efstathiosntonas
Copy link

efstathiosntonas commented Oct 23, 2024

@gingerbenw hi, just installed 8.1.0 and on react-native there's no typings for reportUnhandledPromiseRejectionsAsHandled:

Screenshot 2024-10-23 at 18 08 49

@gingerbenw
Copy link
Member Author

thanks @efstathiosntonas! that one’s entirely on me. I’ll aim to get a fix for this out straight away.

@gingerbenw
Copy link
Member Author

Hi @efstathiosntonas - we've just released v8.1.1 which should fix the TypeScript definitions. Could you please try updating and see if that resolves the issue for you?

@efstathiosntonas
Copy link

efstathiosntonas commented Oct 24, 2024

@gingerbenw hi, tried 8.1.1 and still get the error.

I believe it expects the typings to come from:

type Configurable = 'onError' | 'onBreadcrumb' | 'logger' | 'metadata' | 'user' | 'context' | 'plugins' | 'codeBundleId' | 'featureFlags'

type ReactNativeConfig = Pick<ReactNativeSchema, Configurable>

interface ReactNativeBugsnagStatic extends Client {
  start(jsOpts?: ReactNativeConfig): Client
  isStarted(): boolean
}

which lives in bugsnag.d.ts instead of common.d.ts

@gingerbenw
Copy link
Member Author

Hi @efstathiosntonas - apologies again. Could you please try release 8.1.2?

@efstathiosntonas
Copy link

Hi @gingerbenw, just tested it, all good now! Thank you!

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