code: def _fail_if_contains_errors(response, sync_uuid=None):
      
      if response.status_code != _HTTP_OK:
          raise RequestError(response)
      response_json = response.json()
      if sync_uuid and 'sync_status' in response_json:
          status = response_json['sync_status']
          if sync_uuid in status and 'error' in status[sync_uuid]:
              raise RequestError(response)
docs: Raise a RequestError Exception if a given response
      does not denote a successful request.