catch problems trying to send a 500 response.