-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Add option to enhance the fetch error message #18466
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
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable to me! Let's make sure to document the new option, thanks!
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-off/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-off/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-off/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-report-only/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-report-only/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/errors/fetch-enhance-messages-report-only/test.ts
Outdated
Show resolved
Hide resolved
|
(I was thinking for a moment if it makes sense for us to only add the option to the |
0350acc to
308c1f2
Compare
logaretm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
670b698 to
c03b7aa
Compare
…ance-messages-off/test.ts Co-authored-by: Lukas Stracke <[email protected]>
…ance-messages-off/test.ts Co-authored-by: Lukas Stracke <[email protected]>
…ance-messages-report-only/test.ts Co-authored-by: Lukas Stracke <[email protected]>
…ance-messages-off/test.ts Co-authored-by: Lukas Stracke <[email protected]>
…ance-messages-report-only/test.ts Co-authored-by: Lukas Stracke <[email protected]>
…ance-messages-report-only/test.ts Co-authored-by: Lukas Stracke <[email protected]>
c03b7aa to
e569d60
Compare
e569d60 to
1a07ef6
Compare
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Documents the new [enhanceFetchErrorMessages](getsentry/sentry-javascript#18466) option. (closes #15872) (closes [DOCS-2380](https://linear.app/getsentry/issue/DOCS-2380/new-ways-of-enhance-fetch-error-messages)) ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
(closes #18449)
(closes JS-1281)
Problem
As of now, the user has no chance to disallow the manipulation of fetch errors, as we overwrite the error. This can cause problems as seen in #18449.
Solution
This adds a new option for the SDK (please be very critical about that new option here, since
fetchhas no integration this has to be added as ainitoption).alwaysis the default and acts the same as it is now, so it is acting as feature:To give the user full control of how the errors are done there are 3 settings:
Special attention to reviewers
When having
report-onlythe generated logs locally differ from the ones in Sentry. I am not quite sure if that would cause any problems. This is the only question which I don't have the answer to yetAlternative
In case the size increase is too much, we can also have a boolean that disables that (which is on by default)