-
Notifications
You must be signed in to change notification settings - Fork 5
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: fetch('').catch()
triggers unhandled rejection in debugger
#15
Conversation
@djMax seems like you are the one able to review and merge this one. Could you please take a look and let us know if there is something that blocks merging and releasing the provided solution? |
@djMax I just realized that the github action failed to publish the release to npm: https://github.com/gas-buddy/opentelemetry-instrumentation-fetch-node/actions/runs/9417358726/job/25942406732 Could you please take a look? |
For some reason it seems like I have to run them twice to get them to work. This is the only repo I have that's like this, but it is reliably doing it. Super weird. |
Any updates on a release? |
I think it's already out, no? |
I only see no GH release updated either. |
Seems like there happened no NPM release. |
@djMax sorry for the ping again, but any updates on a release? |
I think this is finally out. |
1. Bug fix for mongodb package: https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-mongodb-v0.46.0 2. Change in types for koa: https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-koa-v0.42.0 3. Bug fix for opentelemetry-instrumentation-fetch-node package: gas-buddy/opentelemetry-instrumentation-fetch-node#15, released with v1.2.3
Due to this v8 debugger issue:
https://issues.chromium.org/issues/41161875
Promise.reject().catch(() => {})
results in the promise rejection still triggeringuncaught exception
in the debugger even though it's later caught.This can cause tests to fail when they use the debugger:
getsentry/sentry-javascript#12343
This PR changes the code to use a try/catch block in an async function which doesn't result in the above debugger issue.