2

I am writing an extension on superagent to allow for requests to be retried when they fail for certain cases. This works well for all cases except for when it is a CORS failure. Is it possible to differentiate a CORS network failure as opposed to an actual "Origin is not allowed by Access-Control-Allow-Origin" failure. Superagent replies with the same error for both cases but is there anything in the XHR that could be used to help differentiate these?

I have tried searching for different ways to solve this but haven't come across anything.

I am also open for opinions for a better way to retry requests.

Mike D
  • 252
  • 1
  • 9

0 Answers0