Skip to content

Exceptions

exceptions

Exception hierarchy for yente-client.

All client-raised errors inherit from YenteError so callers can catch broadly when they don't care which sub-case fired. pydantic.ValidationError is raised separately for input-shape mistakes (unknown kwargs on a per-schema entity class, etc.).

APIError

APIError(
    status_code: int,
    detail: str,
    response: Any | None = None,
)

Bases: YenteError

Non-2xx response from the server.

Attributes:

Name Type Description
status_code

HTTP status as returned.

detail

server-supplied error message (detail field of the JSON body if present; otherwise the response text or a generic message).

response

the raw httpx.Response for advanced inspection.

AuthenticationError

AuthenticationError(
    status_code: int,
    detail: str,
    response: Any | None = None,
)

Bases: APIError

HTTP 401 or 403 — missing or invalid API key.

BadRequestError

BadRequestError(
    status_code: int,
    detail: str,
    response: Any | None = None,
)

Bases: APIError

HTTP 400 — invalid request (unknown schema, malformed filter, …).

ConfigurationError

Bases: YenteError

Bad client configuration (invalid app_name, malformed base_url…).

NotFoundError

NotFoundError(
    status_code: int,
    detail: str,
    response: Any | None = None,
)

Bases: APIError

HTTP 404 — entity, dataset, or property not found.

RateLimitError

RateLimitError(
    status_code: int,
    detail: str,
    retry_after: float | None = None,
    response: Any | None = None,
)

Bases: APIError

HTTP 429 — rate limit exceeded.

Carries retry_after (seconds) when the server provided the header. Automatic retries are not built into the client; callers handle backoff.

ServerError

ServerError(
    status_code: int,
    detail: str,
    response: Any | None = None,
)

Bases: APIError

HTTP 5xx — server-side error.

TransportError

Bases: YenteError

Network-level failure: timeout, connection refused, DNS, TLS handshake.

YenteError

Bases: Exception

Base for every error raised by this client.