Skip to content

InvalidRequestError

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: APIError

Raised when the API request is invalid (400).

This may indicate invalid parameters, unsupported model, or malformed input. Check the error message for details about what needs to be corrected.

Source code in src/clawd_code_sdk/_errors.py
class InvalidRequestError(APIError):
    """Raised when the API request is invalid (400).

    This may indicate invalid parameters, unsupported model, or malformed input.
    Check the error message for details about what needs to be corrected.
    """

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

:fa-brands-github: Show source on GitHub