Skip to content

AuthenticationError

Base classes

Name Children Inherits
APIError
clawd_code_sdk._errors
Base exception for Anthropic API errors.

⋔ Inheritance diagram

graph TD
  1302446528["_errors.AuthenticationError"]
  3485684694["_errors.APIError"]
  2055642102["_errors.ClaudeSDKError"]
  1615621424["builtins.Exception"]
  3224121899["builtins.BaseException"]
  2751680898["builtins.object"]
  3485684694 --> 1302446528
  2055642102 --> 3485684694
  1615621424 --> 2055642102
  3224121899 --> 1615621424
  2751680898 --> 3224121899

🛈 DocStrings

Bases: APIError

Raised when API authentication fails (401).

This typically indicates an invalid API key or insufficient permissions.

Source code in src/clawd_code_sdk/_errors.py
class AuthenticationError(APIError):
    """Raised when API authentication fails (401).

    This typically indicates an invalid API key or insufficient permissions.
    """

    def __init__(self, message: str, model: Model | None = None) -> None:
        super().__init__(message, "authentication_failed", model)

:fa-brands-github: Show source on GitHub