Investigate Canceled API Calls

26 Views Asked by At

Investigating what may be causing api calls to be randomly "Canceled". We are using axios in a React codebase. We see ERR_NETWORK in the axios error, but what are some things that could cause this? A lot of times we see a successful CORS response from the server, but the POST is still Canceled. Sometimes, it is while the POST is in flight.

I have been trying to see if we should be looking at any of the following:

  • withCredentials is used so something with the Cookies in the request?
  • React Router is used - can this cause an api to get cancel if you do a history.push() while it is in flight?
  • Is it likely that the browser is canceling these due to an HTTP2_PROTOCOL_ERROR? Not sure that there is any way to get data around this as we don't have direct access to our customers, and it has been a nightmare to replicate.
0

There are 0 best solutions below