I have one react application (ts+nextjs) deployed in production.
I am using sentry to capture all unhandled exceptions.
I have one issue:
I get a lot of TypeError Failed to fetch
issues during the day for different assumed api calls.
I check the data across my backend and see that backend returned 200 status code correctly, but sentry/js thinks that it failed to fetch
. I cannot reproduce this myself neither does any customer complain (at least not yet)
Just one of many examples in Sentry:
For the screenshoot above for example I verified that the api call to /api/ql endpoint at particular time for particular requestid went through fine and returned 200 status code, but I still don’t understand why here it fails.
Normally failed to fetch is thrown by
- cors issues
- wrong header sent get istead of post and so on
- etc that i don’t know
In this case request seem to be gone through fine to backend with GET
method as from backend logs.
Please any ideas how to troubleshoot further this issue and also solve it?
Thank you