Error handling for the response.