1

In my web application, in non-deterministic conditions, I experience the: "Refused to execute script from because its MIME type (…) and strict MIME type (…)" issue.

Is it possible to somehow detect this issue occurring on client side and report it to the server or some log tool?

From what I see it is possible to catch errors with the windoww.onerror handler but in that case we are dealing with a browser check and not an error per se.

Greg Tomasik
  • 440
  • 6
  • 9
  • Seems to be hard to get much specific error detail. You can play with ``. Can get the target and the target.src from event object but not much in the way of messages which I think is by security design. See section [element.onerror](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#element.onerror) – charlietfl May 31 '21 at 22:12
  • looking for an answer, need to filter out this type of error from the rest – nithin guptha Jul 29 '21 at 18:11

0 Answers0