Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export async function handleFetch(request: string, options?: RequestInit) {
console.log(`response`, response);
throw new Error(
`Fetch error:${JSON.stringify({
request,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dynamic data in error messages has been difficult to work with in the past. It makes it easy to accidentally introduce PII, and it's bad for error grouping on Sentry (each unique message pops up as a separate issue). I'd strongly recommend looking for another solution.

If there is a particular network request / failure case you want more information about, I'd recommend catching there instead and capturing a more detailed exception. This fetch function is used in a variety of places

status: response.status,
...mapKeysToCamel(json),
})}`,
Expand Down