Show error message on response

Added the ability to show a message when the status code is a 4xx/5xx status code.