Claude Platform Docs

Shared

Models
type APIErrorObject struct { Type: "api_error"; Message }
Type APIError
defaultapi_error
Message string
defaultInternal server error
type AuthenticationError struct { Type: "authentication_error"; Message }
Type AuthenticationError
defaultauthentication_error
Message string
defaultAuthentication error
type BillingError struct { Type: "billing_error"; Message }
Type BillingError
defaultbilling_error
Message string
defaultBilling error
type ErrorObjectUnion interface{…}
One of the following:
type ErrorResponse struct { Type: "error"; Error; RequestID }
Type Error
defaulterror
One of the following:
RequestID string
type ErrorType string
One of the following:
const ErrorTypeInvalidRequestError ErrorType = "invalid_request_error"
const ErrorTypeAuthenticationError ErrorType = "authentication_error"
const ErrorTypePermissionError ErrorType = "permission_error"
const ErrorTypeNotFoundError ErrorType = "not_found_error"
const ErrorTypeRateLimitError ErrorType = "rate_limit_error"
const ErrorTypeTimeoutError ErrorType = "timeout_error"
const ErrorTypeOverloadedError ErrorType = "overloaded_error"
const ErrorTypeAPIError ErrorType = "api_error"
const ErrorTypeBillingError ErrorType = "billing_error"
type GatewayTimeoutError struct { Type: "timeout_error"; Message }
Type TimeoutError
defaulttimeout_error
Message string
defaultRequest timeout
type InvalidRequestError struct { Type: "invalid_request_error"; Message }
Type InvalidRequestError
defaultinvalid_request_error
Message string
defaultInvalid request
type NotFoundError struct { Type: "not_found_error"; Message }
Type NotFoundError
defaultnot_found_error
Message string
defaultNot found
type OverloadedError struct { Type: "overloaded_error"; Message }
Type OverloadedError
defaultoverloaded_error
Message string
defaultOverloaded
type PermissionError struct { Type: "permission_error"; Message }
Type PermissionError
defaultpermission_error
Message string
defaultPermission denied
type RateLimitError struct { Type: "rate_limit_error"; Message }
Type RateLimitError
defaultrate_limit_error
Message string
defaultRate limited