Title: Wrong explanation about the Exception Interface in docs. · Issue #8871 · getsentry/sentry-javascript · GitHub
Open Graph Title: Wrong explanation about the Exception Interface in docs. · Issue #8871 · getsentry/sentry-javascript
X Title: Wrong explanation about the Exception Interface in docs. · Issue #8871 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8871
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong explanation about the Exception Interface in docs.","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSelf-hosted/on-premise\n\n### Which SDK are you using?\n\n@sentry/browser\n\n### SDK Version\n\n7.57.0\n\n### Framework Version\n\n7.57.0\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```javascript\r\nSentry.init({\r\n dsn: \u003credacted>,\r\n integrations: integrations,\r\n release: `${$BUILD_FLAVOR}-${$REVISION}`,\r\n environment: $BUILD_FLAVOR,\r\n transport: (transportOptions: BrowserTransportOptions) =>\r\n makeFetchTransport(transportOptions, fetchImpl),\r\n maxBreadcrumbs: 100,\r\n sendClientReports: false,\r\n beforeSend: (event: Event, hint?: EventHint) => {\r\n \u003credacted>\r\n /**\r\n * Essentially, here if the event.exception.values[0] is of the type that we want to skip, we return null, \r\n * otherwise we just return the event.\r\n */\r\n },\r\n });\r\n```\n\n### Steps to Reproduce\n\nThrow an error from a function (let's call it MessageRenderer) that returns React components based on certain conditions, and in one of the conditions it throws an error.\r\nThe return of this function is wrapped in sentry react's ErrorBoundary component.\n\n### Expected Result\n\nWhen looking at the exception.values list in the event object in the beforeSend function, based on the docs (link: https://develop.sentry.dev/sdk/event-payloads/exception/), I was expecting the original error thrown from the function (MessageRenderer from my example above) to be present in the first index, followed by the ErrorBoundary error.\n\n### Actual Result\n\nBut, the first index (index 0) is taken up by the React ErrorBoundary Error object and the second index (index 1) contains the original thrown error. This is opposite of what is mentioned in the docs.\r\n\r\nAm I missing something or is Error Boundary a unique case where this is not true?","author":{"url":"https://github.com/bhargavcp","@type":"Person","name":"bhargavcp"},"datePublished":"2023-08-28T04:09:07Z","url":"https://github.com/getsentry/sentry-javascript/issues/8871"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:42fa9a6b-10d6-f4aa-60a6-cdfb860d5cbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E9D6:C29A4:4474A4:5C1049:6B04A146 |
| html-safe-nonce | 49edafe85e0684a42cf214565604ff1cc0471173abb5f8b73fbe2a5370d5d4fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUQ2OkMyOUE0OjQ0NzRBNDo1QzEwNDk6NkIwNEExNDYiLCJ2aXNpdG9yX2lkIjoiMjAxNzA5MzYzNTMwNDM2NjQwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aad9ef8f20309d586bc8f3f5b15964952e37c4f70c688ae526a17534ef935bc2 |
| hovercard-subject-tag | issue:1868918910 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/8871/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a2c1fded05d1043a50a34f8bd60f82834e07aacb0e30a39712b4373657bae1fc/getsentry/sentry-javascript/issues/8871 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a2c1fded05d1043a50a34f8bd60f82834e07aacb0e30a39712b4373657bae1fc/getsentry/sentry-javascript/issues/8871 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bhargavcp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width