the response body will be nil on error