Capturing CORS Errors #8342
|
Is it possible to capture CORS errors automatically? I want to be able to check when scripts/image requests from my site throw CORS related errors |
Replies: 1 comment 2 replies
|
As per the cors errors docs
EDIT: My above comment is incorrect, you don't have access to CORS errors programmatically from the browser. |
As per the cors errors docs
This means we can't programmatically capture when cors errors occur. What we can instead do is to use theCaptureConsoleintegration to send console warnings/errors to Sentry. Note that you might have to add some preemptive filtering if you have a noisy console.EDIT: My above comment is incorrect, you don't have access to CORS errors programmatically from the browser.