Build an error message from the response body of the failed request