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/, or the service crash, IS return the pipeline as an HTML response. How can I modify that “default” response?