Title: Angular: Sentry.init sends errors without captureException() · Issue #2169 · getsentry/sentry-javascript · GitHub
Open Graph Title: Angular: Sentry.init sends errors without captureException() · Issue #2169 · getsentry/sentry-javascript
X Title: Angular: Sentry.init sends errors without captureException() · Issue #2169 · getsentry/sentry-javascript
Description: I have a project where I followed the Sentry angular documentation at: https://docs.sentry.io/platforms/javascript/angular/ And it worked fine and we were getting errors. Seemed to work find for 7+ months. Soon as we started getting more...
Open Graph Description: I have a project where I followed the Sentry angular documentation at: https://docs.sentry.io/platforms/javascript/angular/ And it worked fine and we were getting errors. Seemed to work find for 7+...
X Description: I have a project where I followed the Sentry angular documentation at: https://docs.sentry.io/platforms/javascript/angular/ And it worked fine and we were getting errors. Seemed to work find for 7+...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/2169
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular: Sentry.init sends errors without captureException()","articleBody":"I have a project where I followed the Sentry angular documentation at:\r\nhttps://docs.sentry.io/platforms/javascript/angular/\r\nAnd it worked fine and we were getting errors.\r\n\r\nSeemed to work find for 7+ months. Soon as we started getting more users, we noticed that the number of errors in Sentry had increased a lot - a few 10s of thousands more than what we expected.\r\n\r\nOn debugging, I tried just disabling Sentry and was surprised to see quite a lot of errors still being reported!\r\n\r\nI am using Angular 7 with `\"@sentry/browser\": \"^5.5.0\",`\r\n\r\nThe error is from a network call that is giving me a unauthorized because some users try to access something they are not supposed to.\r\nWe catch these and show them a \"Unauthorized\" page appropriately. So, I don't want Sentry to report these!\r\n\r\nThe way we set it up is:\r\n```js\r\nimport * as Sentry from '@sentry/browser';\r\nimport { ErrorHandler, Injectable } from '@angular/core';\r\n\r\n\r\n@Injectable()\r\nexport class SentryErrorHandler implements ErrorHandler {\r\n constructor() {\r\n Sentry.init({dsn: '.....'});\r\n }\r\n handleError(error: Error) {\r\n if (error instanceof Error) {\r\n console.error(error);\r\n // Sentry.captureException(error); // \u003c--- Even after commenting this out, Errors are reported.\r\n }\r\n }\r\n}\r\n```\r\n\r\nI'm trying to figure out what is reporting these errors.\r\nI see the stacktrace to be from Angular's zone modules. but I haven't configured it to report anything there to the best of my knowledge.\r\n\r\n\u003cimg width=\"919\" alt=\"Screen Shot 2019-07-18 at 3 12 38 PM\" src=\"https://user-images.githubusercontent.com/7136799/61447444-956dab80-a96e-11e9-9967-a5d421b8134d.png\">\r\n","author":{"url":"https://github.com/anikets43","@type":"Person","name":"anikets43"},"datePublished":"2019-07-18T09:40:18Z","url":"https://github.com/getsentry/sentry-javascript/issues/2169"}
| 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:a37bc7a0-fed3-92ca-a22f-fd6350ba7d71 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A1C:173F75:5A254E:7EEBA7:6B04485E |
| html-safe-nonce | 709bebb45d6ba0dde3bf02b87665b6985461522133f489caddd5789ad035802e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTFDOjE3M0Y3NTo1QTI1NEU6N0VFQkE3OjZCMDQ0ODVFIiwidmlzaXRvcl9pZCI6IjQ2MjI5MDI3MzUzMzgyMjc4MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9bd659895b1d5b4e5413459349ae7b7172124c863215c2d653c2aed0d51bfaf0 |
| hovercard-subject-tag | issue:469670176 |
| 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/2169/issue_layout |
| twitter:image | https://opengraph.githubassets.com/78cd740ab0ea760fd6d875f87923c41912c6070504aa286d23a574b40ac478c6/getsentry/sentry-javascript/issues/2169 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/78cd740ab0ea760fd6d875f87923c41912c6070504aa286d23a574b40ac478c6/getsentry/sentry-javascript/issues/2169 |
| og:image:alt | I have a project where I followed the Sentry angular documentation at: https://docs.sentry.io/platforms/javascript/angular/ And it worked fine and we were getting errors. Seemed to work find for 7+... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anikets43 |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| 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 | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| 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