Main problem:
The function assigned to xhr.onerror does not propagate helpful information concerning the error that occurred, instead only "Network request failed" is presented.
For example I've got an error
On my fetch error handling I've got error:
TypeError: Network request failed
But I need to see all error info like ...has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource
How to fix?
In browser-polyfill.js
We should change xhr.onerror to:
I could open the PR, but I can't see browser-polyfill.js here
Main problem: The function assigned to xhr.onerror does not propagate helpful information concerning the error that occurred, instead only "Network request failed" is presented.
For example I've got an error
On my fetch error handling I've got error:
TypeError: Network request failed
But I need to see all error info like
...has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource
How to fix?
In
browser-polyfill.js
We should change
xhr.onerror
to:I could open the PR, but I can't see
browser-polyfill.js
here