Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.29.0
Framework Version
NextJs 15
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
The fetch instrumentation modifies network error messages by appending the hostname:
// packages/core/src/instrument/fetch.ts:106-123error.message=`${error.message} (${url.host})`;// "Failed to fetch" → "Failed to fetch (example.com)"Expected Result
The Problem
Popular packages like is-network-error (2M+ downloads/week) and p-retry (6M+ downloads/week) rely on exact error message matching:
consterrorMessages=newSet(['Failed to fetch',// Exact match required'Load failed','NetworkError when attempting to fetch resource.',]);
When Sentry modifies the message to "Failed to fetch (example.com)", these packages no longer recognize it as a network error, causing:
- p-retry stops retrying network failures
- Legitimate transient errors fail permanently
- Breaking change with no migration path
Suggested Solutions
- Add opt-out configuration:
enhanceFetchErrors: false - Add hostname as an error property instead of modifying the message
- Only modify the message in
beforeSend, not the original error object
Actual Result
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.29.0
Framework Version
NextJs 15
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
The fetch instrumentation modifies network error messages by appending the hostname:
Expected Result
The Problem
Popular packages like is-network-error (2M+ downloads/week) and p-retry (6M+ downloads/week) rely on exact error message matching:
When Sentry modifies the message to "Failed to fetch (example.com)", these packages no longer recognize it as a network error, causing:
Suggested Solutions
enhanceFetchErrors: falsebeforeSend, not the original error objectActual Result
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.