The requirement is sending some measurement/log back to backend regarding js/css errors in browser. I looked in many place but seems like there is no way to do this.
I found https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
If the script is blocked, an error is sent to the element, if not a load event is sent.
so actually I can add onerror attribute to those each script tags and invoke the error handler.