You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Always attach some URL/target data point to fetch/xhr/request errors #13168
We technically have a stack trace here but sourcemaps are broken so the user has basically no idea what fetch request failed. It's very hard to gauge from breadcrumbs what exact request failed.
Side note, the fetch call that failed looked like fetch(""). We render this as in the product, you guessed it "". Which is crap because it actually means the request went to the current route. We should at least coerce that string to URL(fetchTarget, window.location.href).toString() in the SDK.
Found 1 more spot , i think xhr.open('GET', '') is never instrumented, because the check in xhr.ts is !url, which treats an empty string like an unparseable argument. fetch('') does get a breadcrumb and span.
Good find, yes please! fetch('') is already instrumented, so XHR should match and bailing only on url === undefined sounds correct.
Can you also handle the breadcrumb URL in the same PR (your question from the first comment, now hidden)? Once xhr.open('GET', '') is instrumented, its breadcrumb would show "" too (same as fetch).
When we resolve the url with location.href (like your PR #25784 does) and then stripping query and fragment (stripUrlQueryAndFragment in core) we can get the path without leaking params into breadcrumbs.
Activity
kunal649 commentedon Oct 20, 2026
3 remaining items
lforst commentedon Oct 20, 2026
big
kunal649 commentedon Oct 28, 2026
Found 1 more spot , i think
xhr.open('GET', '')is never instrumented, because the check in xhr.ts is!url, which treats an empty string like an unparseable argument. fetch('') does get a breadcrumb and span.sentry-javascript/packages/browser-utils/src/instrumentation/xhr.ts
Lines 54 to 56 in 90a71e7
Should i open a small PR that only bails when the URL can't be parsed (url === undefined)? - @s1gr1d wdyt should empty-URL XHRs stay uninstrumented?
s1gr1d commentedon Nov 6, 2026
Good find, yes please!
fetch('')is already instrumented, so XHR should match and bailing only onurl === undefinedsounds correct.Can you also handle the breadcrumb URL in the same PR (your question from the first comment, now hidden)? Once
xhr.open('GET', '')is instrumented, its breadcrumb would show""too (same as fetch).When we resolve the url with
location.href(like your PR #25784 does) and then stripping query and fragment (stripUrlQueryAndFragmentin core) we can get the path without leaking params into breadcrumbs.kunal649 commentedon Nov 7, 2026
opened a PR with both changes, take a look when you get a chance.
fix(browser): Instrument empty-URL XHR and show the page URL in bread…
kunal649 commentedon Nov 12, 2026
Can it be closed now?