airflow.providers.common.ai.utils.readiness_errors¶
Functions¶
|
Return the |
|
Re-raise httpx2 errors from a readiness request with messages naming the failed step. |
Module Contents¶
- airflow.providers.common.ai.utils.readiness_errors.extract_error_detail(response)[source]¶
Return the
errorfield, or itsmessagewhen it is an object, else the body cut to a short length.
- airflow.providers.common.ai.utils.readiness_errors.translate_readiness_errors(*, server, root, timeout, failure, timeout_failure)[source]¶
Re-raise httpx2 errors from a readiness request with messages naming the failed step.
- Parameters:
server (str) – Server name used to start each message, such as
Ollama.root (str) – Server root, named when the server cannot be reached.
timeout (float) – Seconds reported in the timeout messages.
failure (str) – Message after server for an error status, followed by the status code and detail.
timeout_failure (str) – Message after server for a read timeout, followed by timeout.
- Raises:
httpx2.HTTPStatusError – On an error status, with the server’s error text in the message.
httpx2.ConnectError – When the server cannot be reached, with the server and root named in the message.
TimeoutError – On a connect timeout or any other timeout.