Note: mentions that there may be no need to worry as the issue might not occur on an actual device.
In my VueJS hybrid (Cordova) app, I am utilizing Axios to make API calls.
Axios correctly initiates a 'preflight' OPTIONS
request before my GET
/POST
requests. However, if the API responds with a 503
at that stage, my error handling code does not trigger.
HTTP.post(url, data, {headers: {Authorization: 'Bearer ' + token.getAccessToken()}})
.then(response => response)
.catch(error => {
// This section is never reached
});
How can I capture and handle this error status?
Edit: Chrome dev tools screenshot provided below: