getsentry / getsentry/sentry-javascript

Always attach some URL/target data point to fetch/xhr/request errors

オープン
#13,168 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
Browser Errors Improvement
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
515

説明

### Description

The Sentry Chief Product Officer has brought to our attention that Fetch errors sometimes suck. ([example that will expire in 90 days](https://peated.sentry.io/issues/5656229682/?referrer=regression_activity-email¬ification_uuid=add413c0-019a-4b87-ae37-608eb905a605))

![Image](https://github.com/user-attachments/assets/a8106189-e78e-486f-b5c8-5373af5cc61d)

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.

![Image](https://github.com/user-attachments/assets/2deb0b10-8afd-4efb-8171-592eb98e4859)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。