Better error message when no CORS
rweigel opened this issue · comments
Bob Weigel commented
Message:
error
The Javascript console reports
Access to XMLHttpRequest at 'http://planet.physics.uiowa.edu/das/das2Server/hapi/catalog' from origin 'http://hapi-server.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Bob Weigel commented
Partial fix visible at http://hapi-server.org/servers-dev/#server=DAS2
Will need to use one of the techniques at https://stackoverflow.com/q/19325314 to determine if generic error is due to CORS. If so, message should be that server's header does not allow and point to section in spec that covers CORS.