read_failure#

Connect a provider and configure retries, credentials, and transport. See the guide.

zett_agent.providers.http_errors.read_failure(*, content_type, text, parsed=None)[source]#

Work out what a failed or unexpected response body is.

Parameters:
  • content_type (str | None) – The Content-Type header, or None.

  • text (str) – The body as text; may be empty.

  • parsed (object) – The body already decoded as JSON, when the caller has it.

Return type:

HttpFailure