-
Notifications
You must be signed in to change notification settings - Fork 0
fix: await Sentry. flush() on Vercel #2
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
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/natterstefan/next-with-sentry/C94cSJ7ppk3AUesFmuwwefPn9yrw |
This reverts commit 862be23.
Update 2021-06-30I created a PR in the next.js repo with the The maintainers of And let's see what happens here getsentry/sentry-javascript#3746. |
|
I can confirm, that Demo URL: https://next-with-sentry-31rtz63z3-natterstefan.vercel.app/api/test4 |
Debugging
With Try Catch: ✅
Log on Vercel
Without Try Catch: ❌
Log on Vercel
Vercel Logs
The
falselog on Vercel comes from theawait Sentry.flush(2000)Promise.reject vs. Promise.resolve
They do not resolve but reject the promise. The comment was misleading...
This
try/catchsolution was mentioned here as well.Also, the
with-sentryexample does not indicate that you shouldtry/catchawait Sentry.flushas well (https://github.com/vercel/next.js/blob/9ab916ac99eb200a478c8d5ffe94b6ec9c0a315b/examples/with-sentry/pages/api/test4.js#L12).