Skip to content

Fetch errors provide very little info #4146

Closed
@rchl

Description

@rchl

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

6.14.1

Description

When there is a failure to make a fetch request, the errors reported have no information that would allow me to know what request was attempted. The breadcrumb integration saves the day a little bit because I can look for errors in it but it's not solving the issue 100% since with lazy loading the breadcrumbs might be missing.

Would it be possible to provide more information in cases when fetch requests fail?

A typical event for those kind of errors is a TypeError: failed to fetch exception, for example, with an exception message that can differ per browser and even locale so it's hard to ignore it just based on that.

Screenshot 2021-11-11 at 15 51 48

I believe that Sentry wraps the fetch API so I think it is in a position to provide more information in that case.

To clarify, I'm talking about when request has failed to be dispatched, not when the request finishes with an error code (that doesn't report a Sentry event normally). So for example when the URL is blocked through the Developer tools "block url" functionality (easy to test with).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions