Is it possible to detect response status code if request was rejected by CORS?
Let's say for testing purposes my server side which is located on different domain is hardcoded to return 503 status code. Because of that - all requests rejects and catched by .catch(error => {}) but error argument is just rejecting message (TypeError: Failed to fetch), it does not contain status code and I can not find a way to detect it.
Is it possible at all?
Is it possible to detect response status code if request was rejected by CORS?
Let's say for testing purposes my server side which is located on different domain is hardcoded to return 503 status code. Because of that - all requests rejects and catched by
.catch(error => {})buterrorargument is just rejecting message (TypeError: Failed to fetch), it does not contain status code and I can not find a way to detect it.Is it possible at all?