Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

ClientError

Raised on a 4xx HTTP response from the GraphQL endpoint.

Definition

class ClientError(Error):
    """Raised on a 4xx HTTP response from the GraphQL endpoint."""

When it fires

Any 4xx status from <base_url>/graphql. The most common causes:

  • 400 — malformed request
  • 401 / 403 — auth / authz failure
  • 429 — rate limit

The exception message wraps the first 500 characters of the response body. Inspect via str(exc).

Example

from dango.utils.error import ClientError
 
try:
    info.query_status()
except ClientError as exc:
    if "429" in str(exc):
        # back off and retry
        ...
    else:
        raise

See also