HttpFailure#
Connect a provider and configure retries, credentials, and transport. See the guide.
- class zett_agent.providers.http_errors.HttpFailure(reason, is_html, title, preview)[source]#
What an HTTP error response or a response that was not an API reply turned out to say.
- Parameters:
reason (str | None)
is_html (bool)
title (str | None)
preview (str)
- reason#
The provider’s own explanation when the body was a JSON error; None when it was not.
- Type:
str | None
- is_html#
Whether the body was a web page.
- Type:
bool
- title#
The page’s title or first heading, for an HTML body.
- Type:
str | None
- preview#
The start of the body as plain text, whitespace collapsed and limited in length, for the cases where there is no
reason.- Type:
str