The ACC API allows CORS by providing necessary CORS headers in response.
This works fine when the request is sent & processed successfully, but the browser will block the response if an error occurred (due to invalid data).
Can we check if we have proper CORS headers when the API returns an error (HTTP status 4xx)?
I need this because I will need to inform the user that the submission failed and the reason for it.
Error in Browser:
No 'Access-Control-Allow-Origin' header is present on the requested resource.