In ASP.NET WebApi2, if there is an internal server error, a 500 Response is sent without the Access-Control-Allow-Origin header, even if CORS is enabled .
This causes the browser to report a CORS error and not an internal server error.
I assume that the server in an error state will not be able to report the origin to which it will respond, so it seems to me that the browser should handle this exceptional case and report an internal error, not CORS.
A) Is there a way to make the internal server error appear in the browser as a reason for the failure of my request?
B) Should there be a problem with the browser regarding this?
Jesse source share