René's URL Explorer Experiment


Title: @sentry/nextjs not reporting errors from API (serverless) endpoints in Vercel · Issue #3917 · getsentry/sentry-javascript · GitHub

Open Graph Title: @sentry/nextjs not reporting errors from API (serverless) endpoints in Vercel · Issue #3917 · getsentry/sentry-javascript

X Title: @sentry/nextjs not reporting errors from API (serverless) endpoints in Vercel · Issue #3917 · getsentry/sentry-javascript

Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...

Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...

X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3917

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/nextjs not reporting errors from API (serverless) endpoints in Vercel","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [ ] Provide a link to the affected event from your Sentry account\r\n\r\n## Package + Version\r\n\r\n- [x] `@sentry/nextjs`\r\n\r\n### Version:\r\n\r\n```\r\n6.11.0\r\n```\r\n\r\n## Description\r\n\r\nI was unable to get error reporting from API endpoints deployed in Vercel (as serverless functions) with `@sentry/nextjs` version 6.11.0 but downgrading to 6.4.1 fixed in.\r\n\r\nOur app is a new one built with Next.js 11.1 from `create-next-app` as of last week.\r\n\r\nWe used the latest `@sentry/nextjs` configured according to the documentation, and with additional changes following the [with-sentry example](https://github.com/vercel/next.js/tree/canary/examples/with-sentry): specifically, added *_error.js* page and `err` pass through to `\u003cComponent/>` in *_app.js*.\r\n\r\nBefore downgrading, client errors were logged fine but I couldn't get error reports from Vercel serverless functions at all.\r\nBoth client- and server-side errors were logged successfully to Sentry when running the project locally with `yarn dev`.\r\n\r\nThis is the failing API endpoint I used to test in file *pages/api/boom.js*:\r\n```js\r\nimport { withSentry } from \"@sentry/nextjs\";\r\n\r\nconst handler = async function handler(req, res) {\r\n  // Trigger an exception\r\n  boom();\r\n\r\n  res.status(200).send(\"OK\");\r\n};\r\n\r\nexport default withSentry(handler);\r\n```\r\n\r\nThe problem seems similar to other reported issues:\r\n- https://github.com/getsentry/sentry-javascript/issues/3643 (closed at time of writing, otherwise I would have commented there instead)\r\n- https://github.com/getsentry/sentry-javascript/issues/3869 (open at time of writing; seemingly fixed, but does not mention API routes)","author":{"url":"https://github.com/jmurty","@type":"Person","name":"jmurty"},"datePublished":"2021-08-24T01:19:57Z","url":"https://github.com/getsentry/sentry-javascript/issues/3917"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:240385d9-dd4c-ef69-5b8c-d09ff7c55a44
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB21C:3551E1:4180E9:5B0D77:6B0441E6
html-safe-nonce494e03773f9b2ace05d3ef55209d89a132fba859e16ac9cc8de740c24b36e939
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjFDOjM1NTFFMTo0MTgwRTk6NUIwRDc3OjZCMDQ0MUU2IiwidmlzaXRvcl9pZCI6Ijc5NTUxMjk5NDkxODExOTg4MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd2ba23b4fc6f75b7afff4e688f8bbce200948b82e6e6b45bfe4114c6434b564a
hovercard-subject-tagissue:977609501
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/3917/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d40448e531200982aeff484bf836785a16454d0db0d54bf36eaa40b9cd81f074/getsentry/sentry-javascript/issues/3917
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d40448e531200982aeff484bf836785a16454d0db0d54bf36eaa40b9cd81f074/getsentry/sentry-javascript/issues/3917
og:image:altReview the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejmurty
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/3917#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F3917
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F3917
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3917
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3917
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3917
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests53 (53)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3917
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3917
#4027https://github.com/getsentry/sentry-javascript/pull/4027
@sentry/nextjs not reporting errors from API (serverless) endpoints in Vercelhttps://github.com/getsentry/sentry-javascript/issues/3917#top
#4027https://github.com/getsentry/sentry-javascript/pull/4027
https://github.com/jmurty
jmurtyhttps://github.com/jmurty
on Aug 24, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issue-977609501
https://docs.sentry.io/https://docs.sentry.io/
https://github.com/getsentry/sentry-javascript/issueshttps://github.com/getsentry/sentry-javascript/issues
https://github.com/getsentry/sentry-javascript/releaseshttps://github.com/getsentry/sentry-javascript/releases
with-sentry examplehttps://github.com/vercel/next.js/tree/canary/examples/with-sentry
@sentry/nextjs not reporting issues i serverless functions #3643https://github.com/getsentry/sentry-javascript/issues/3643
Next.js package does not report server and some client errors #3869https://github.com/getsentry/sentry-javascript/issues/3869
Nexthttps://github.com/getsentry/sentry-javascript/issues/3917?timeline_page=1
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Aug 24, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5197713816
https://github.com/DavidChouinard
DavidChouinardhttps://github.com/DavidChouinard
on Aug 24, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-904269791
#3643https://github.com/getsentry/sentry-javascript/issues/3643
https://github.com/lobsterkatie
lobsterkatiehttps://github.com/lobsterkatie
on Aug 24, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-904691587
@jmurtyhttps://github.com/jmurty
@DavidChouinardhttps://github.com/DavidChouinard
lobsterkatiehttps://github.com/lobsterkatie
Package: nextjshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20nextjs%22
Status: Needs Informationhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Information%22
Type: Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Aug 24, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5201023703
https://github.com/DavidChouinard
DavidChouinardhttps://github.com/DavidChouinard
on Aug 25, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-905091683
https://github.com/jmurty
jmurtyhttps://github.com/jmurty
on Aug 25, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-905233470
@lobsterkatiehttps://github.com/lobsterkatie
https://github.com/jmurty/nextjs-sentry-vercel-testhttps://github.com/jmurty/nextjs-sentry-vercel-test
https://sentry.io/organizations/murty/issues/?project=5925157https://sentry.io/organizations/murty/issues/?project=5925157
https://nextjs-sentry-vercel-test.vercel.app/https://nextjs-sentry-vercel-test.vercel.app/
/api/test4https://github.com/jmurty/nextjs-sentry-vercel-test/blob/main/pages/api/test4.js
/api/test3https://github.com/jmurty/nextjs-sentry-vercel-test/tree/main/pages/api/test3.js
nextjs-sentry-vercel-test.vercel.logs.txthttps://github.com/getsentry/sentry-javascript/files/7044333/nextjs-sentry-vercel-test.vercel.logs.txt
https://github.com/jmurty
jmurtyhttps://github.com/jmurty
on Aug 25, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-905240275
https://github.com/jmurty/nextjs-sentry-vercel-test/tree/sentry-6.4.1https://github.com/jmurty/nextjs-sentry-vercel-test/tree/sentry-6.4.1
https://nextjs-sentry-vercel-test-git-sentry-641-jmurty.vercel.app/https://nextjs-sentry-vercel-test-git-sentry-641-jmurty.vercel.app/
nextjs-sentry-vercel-test.6_4_1.vercel.logs.txthttps://github.com/getsentry/sentry-javascript/files/7044452/nextjs-sentry-vercel-test.6_4_1.vercel.logs.txt
iker-barriocanalhttps://github.com/iker-barriocanal
Status: Confirmedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Confirmed%22
Status: Needs Informationhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Information%22
on Aug 27, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5217882191
https://github.com/lobsterkatie
lobsterkatiehttps://github.com/lobsterkatie
on Sep 2, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-910930443
@jmurtyhttps://github.com/jmurty
@DavidChouinardhttps://github.com/DavidChouinard
https://github.com/DavidChouinard
DavidChouinardhttps://github.com/DavidChouinard
on Sep 8, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-914729431
@lobsterkatiehttps://github.com/lobsterkatie
https://github.com/Jimmy89
Jimmy89https://github.com/Jimmy89
on Sep 9, 2021https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-916032578
@lobsterkatiehttps://github.com/lobsterkatie
lobsterkatiehttps://github.com/lobsterkatie
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4027https://github.com/getsentry/sentry-javascript/pull/4027
on Nov 15, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5619571907
lobsterkatiehttps://github.com/lobsterkatie
on Nov 15, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5619572104
fix(nextjs): Delay error propagation until `withSentry` is done (#4027)https://github.com/getsentry/sentry-javascript/commit/fb66a7836b173bc9cdc31f2f212f5b442ef5092a
#4027https://github.com/getsentry/sentry-javascript/pull/4027
fb66a78https://github.com/getsentry/sentry-javascript/commit/fb66a7836b173bc9cdc31f2f212f5b442ef5092a
fix(nextjs): Delay error propagation until `withSentry` is done (#4027)https://github.com/getsentry/sentry-javascript/commit/cf6365fb466b1f0cabe208d88edb50aa5df5aaed
#4027https://github.com/getsentry/sentry-javascript/pull/4027
cf6365fhttps://github.com/getsentry/sentry-javascript/commit/cf6365fb466b1f0cabe208d88edb50aa5df5aaed
onurtemizkanhttps://github.com/onurtemizkan
on Dec 19, 2021https://github.com/getsentry/sentry-javascript/issues/3917#event-5789287783
fix(nextjs): Delay error propagation until `withSentry` is done (#4027)https://github.com/getsentry/sentry-javascript/commit/ce1563a4a37c198d1c9d54bbaf9202b53a7b8d8e
#4027https://github.com/getsentry/sentry-javascript/pull/4027
ce1563ahttps://github.com/getsentry/sentry-javascript/commit/ce1563a4a37c198d1c9d54bbaf9202b53a7b8d8e
https://github.com/iCodePoet
iCodePoethttps://github.com/iCodePoet
on Dec 7, 2022https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1340642604
https://github.com/anguskeatinge
anguskeatingehttps://github.com/anguskeatinge
on Dec 7, 2022https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1340697854
https://github.com/martinnabhan
martinnabhanhttps://github.com/martinnabhan
on Dec 7, 2022https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1340713043
https://github.com/jmurty
jmurtyhttps://github.com/jmurty
on Dec 7, 2022https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1340722075
#6120https://github.com/getsentry/sentry-javascript/issues/6120
https://github.com/maxdeichmann
maxdeichmannhttps://github.com/maxdeichmann
on Jan 17, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1896258598
https://github.com/langfuse/langfuse/blob/main/sentry.server.config.tshttps://github.com/langfuse/langfuse/blob/main/sentry.server.config.ts
https://github.com/mijiapps
mijiappshttps://github.com/mijiapps
on Feb 20, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1955172016
https://github.com/maxdeichmann
maxdeichmannhttps://github.com/maxdeichmann
on Feb 20, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-1955197099
@lobsterkatiehttps://github.com/lobsterkatie
https://github.com/jwayne
jwaynehttps://github.com/jwayne
on Dec 17, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-2549325509
https://github.com/Yuripetusko
Yuripetuskohttps://github.com/Yuripetusko
on Dec 18, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-2551060268
https://github.com/Yuripetusko
Yuripetuskohttps://github.com/Yuripetusko
on Dec 18, 2024https://github.com/getsentry/sentry-javascript/issues/3917#issuecomment-2551198848
#14780https://github.com/getsentry/sentry-javascript/issues/14780
prajeenvhttps://github.com/prajeenv
on Apr 10, 2026https://github.com/getsentry/sentry-javascript/issues/3917#event-24374050814
fix: flush Sentry buffer in API routes for Vercel serverlesshttps://github.com/prajeenv/BrandsIQ/commit/893c59efd7043247d98b2b2f8f67099513a93779
893c59ehttps://github.com/prajeenv/BrandsIQ/commit/893c59efd7043247d98b2b2f8f67099513a93779
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/3917
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3917
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.