I have an error related to CORs for a test deployment of OpenCPU, which may get its own question, but for now I'd like it to fail without notifying the end user via a popup - is this possible?
The error I see in the browser console is due to the website swapping TLD as you navigate:
XMLHttpRequest cannot load http://104.XX.3.XX/ocpu/library/predict/R/. The 'Access-Control-Allow-Origin' header has a value 'http://www.XXXX.com' that is not equal to the supplied origin. Origin 'http://www.XXXX.dk' is therefore not allowed access.
And a popup appears:
I'd like to ensure if there are possible future errors it doesn't detract for the user experience - in this case OpenCPU is used for a non-essential function of the website.