Responds with error message for 500 errors.