Modify default HTML response from IS

I’m trying to modify the default HTML response for HTTP request from IS.
I know we can use the setResponse but if somebody type the wrong URL (like http://localhost:5555/invoke/wm.tn/receive2), or the service crash, IS return the pipeline as an HTML response. How can I modify that “default” response?

Thanks

Bert