I am using React.js and the hosted version of sentry.io
When I make a standard web request with fetch I wanted to log the errors to Sentry. As the response is a Response object I assumed Sentry would handle in an appropriate way. However, it just logs ‘[object Response]’. I assume this is the intended behaviour and I am doing something very stupid since there is no blogging or similar that I can find about what would be the appropriate thing to do here instead.
fetch(some_url)
.then(do_something)
.catch((error) => Sentry.captureException(error))
I really just want to capture the fact that it has failed into Sentry with sufficiently useful information so that we can fix bugs etc over time, most of the time this error is very much an unexpected case.