UNPKG

@anthropic-ai/sdk

Version:
272 lines • 11 kB
import { BadRequestError, ContentTooLargeError, PaymentRequiredError, PermissionDeniedError, RateLimitError as ErrorsRateLimitError, ServiceUnavailableError, } from "../core/error.mjs"; /** * The API key belongs to the Claude Code workspace, and the user who created it is * no longer a member of the organization or of that workspace. */ export var ClaudeCodeKeyCreatorNotMemberError = /* @__PURE__ */ (() => { /** * The API key belongs to the Claude Code workspace, and the user who created it is * no longer a member of the organization or of that workspace. */ class ClaudeCodeKeyCreatorNotMemberError extends BadRequestError { } /** @internal */ ClaudeCodeKeyCreatorNotMemberError._errorName = 'ClaudeCodeKeyCreatorNotMemberError'; return ClaudeCodeKeyCreatorNotMemberError; })(); /** * The request comes from a Claude Code version older than the minimum that the * requested model or the organization requires. Update Claude Code, then retry. */ export var ClaudeCodeVersionTooOldError = /* @__PURE__ */ (() => { /** * The request comes from a Claude Code version older than the minimum that the * requested model or the organization requires. Update Claude Code, then retry. */ class ClaudeCodeVersionTooOldError extends BadRequestError { } /** @internal */ ClaudeCodeVersionTooOldError._errorName = 'ClaudeCodeVersionTooOldError'; return ClaudeCodeVersionTooOldError; })(); /** * The workspace's customer-managed encryption key is disabled or revoked. * Re-enable the key, then retry. */ export var CMEKKeyDisabledError = /* @__PURE__ */ (() => { /** * The workspace's customer-managed encryption key is disabled or revoked. * Re-enable the key, then retry. */ class CMEKKeyDisabledError extends BadRequestError { } /** @internal */ CMEKKeyDisabledError._errorName = 'CMEKKeyDisabledError'; return CMEKKeyDisabledError; })(); /** * The key management service's network access controls blocked the request to the * workspace's customer-managed encryption key. The key itself may be healthy. */ export var CMEKKeyNetworkBlockedError = /* @__PURE__ */ (() => { /** * The key management service's network access controls blocked the request to the * workspace's customer-managed encryption key. The key itself may be healthy. */ class CMEKKeyNetworkBlockedError extends BadRequestError { } /** @internal */ CMEKKeyNetworkBlockedError._errorName = 'CMEKKeyNetworkBlockedError'; return CMEKKeyNetworkBlockedError; })(); /** * Anthropic has disabled the organization for trust and safety reasons. An * organization disabled for any other reason, such as billing, does not get this * code. `appeal_url`, when present, is where the organization can appeal. */ export var OrganizationOnHoldError = /* @__PURE__ */ (() => { /** * Anthropic has disabled the organization for trust and safety reasons. An * organization disabled for any other reason, such as billing, does not get this * code. `appeal_url`, when present, is where the organization can appeal. */ class OrganizationOnHoldError extends BadRequestError { } /** @internal */ OrganizationOnHoldError._errorName = 'OrganizationOnHoldError'; return OrganizationOnHoldError; })(); /** * The endpoint does not support the organization's type. Each endpoint's * description says which organization types it supports. */ export var OrganizationTypeNotSupportedError = /* @__PURE__ */ (() => { /** * The endpoint does not support the organization's type. Each endpoint's * description says which organization types it supports. */ class OrganizationTypeNotSupportedError extends BadRequestError { } /** @internal */ OrganizationTypeNotSupportedError._errorName = 'OrganizationTypeNotSupportedError'; return OrganizationTypeNotSupportedError; })(); /** * The endpoint serves only organizations that belong to a parent organization, and * this organization belongs to none. */ export var ParentOrganizationRequiredError = /* @__PURE__ */ (() => { /** * The endpoint serves only organizations that belong to a parent organization, and * this organization belongs to none. */ class ParentOrganizationRequiredError extends BadRequestError { } /** @internal */ ParentOrganizationRequiredError._errorName = 'ParentOrganizationRequiredError'; return ParentOrganizationRequiredError; })(); /** * The request body is not valid for its `Content-Encoding`. */ export var RequestBodyEncodingInvalidError = /* @__PURE__ */ (() => { /** * The request body is not valid for its `Content-Encoding`. */ class RequestBodyEncodingInvalidError extends BadRequestError { } /** @internal */ RequestBodyEncodingInvalidError._errorName = 'RequestBodyEncodingInvalidError'; return RequestBodyEncodingInvalidError; })(); /** * The request's `Content-Encoding` is not supported. */ export var RequestBodyEncodingUnsupportedError = /* @__PURE__ */ (() => { /** * The request's `Content-Encoding` is not supported. */ class RequestBodyEncodingUnsupportedError extends BadRequestError { } /** @internal */ RequestBodyEncodingUnsupportedError._errorName = 'RequestBodyEncodingUnsupportedError'; return RequestBodyEncodingUnsupportedError; })(); /** * Anthropic cannot currently bill the organization linked to the request's user * profile, for a reason that lies with that organization's own account. The * response does not say what the reason is. */ export var LinkedOrganizationBillingUnavailableError = /* @__PURE__ */ (() => { /** * Anthropic cannot currently bill the organization linked to the request's user * profile, for a reason that lies with that organization's own account. The * response does not say what the reason is. */ class LinkedOrganizationBillingUnavailableError extends PaymentRequiredError { } /** @internal */ LinkedOrganizationBillingUnavailableError._errorName = 'LinkedOrganizationBillingUnavailableError'; return LinkedOrganizationBillingUnavailableError; })(); /** * The organization linked to the request's user profile has reached a spend limit * that it set, or lacks credit for the request. The response does not say which * applies. */ export var LinkedOrganizationSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization linked to the request's user profile has reached a spend limit * that it set, or lacks credit for the request. The response does not say which * applies. */ class LinkedOrganizationSpendLimitReachedError extends PaymentRequiredError { } /** @internal */ LinkedOrganizationSpendLimitReachedError._errorName = 'LinkedOrganizationSpendLimitReachedError'; return LinkedOrganizationSpendLimitReachedError; })(); /** * The request came from a Claude sandbox with restricted network access, which is * not allowed to make this request. Send it from outside the sandbox, or from a * sandbox with unrestricted network access. */ export var SandboxEgressRestrictedError = /* @__PURE__ */ (() => { /** * The request came from a Claude sandbox with restricted network access, which is * not allowed to make this request. Send it from outside the sandbox, or from a * sandbox with unrestricted network access. */ class SandboxEgressRestrictedError extends PermissionDeniedError { } /** @internal */ SandboxEgressRestrictedError._errorName = 'SandboxEgressRestrictedError'; return SandboxEgressRestrictedError; })(); /** * The compressed request body exceeds the request size limit once decoded. */ export var RequestBodyTooLargeAfterDecodingError = /* @__PURE__ */ (() => { /** * The compressed request body exceeds the request size limit once decoded. */ class RequestBodyTooLargeAfterDecodingError extends ContentTooLargeError { } /** @internal */ RequestBodyTooLargeAfterDecodingError._errorName = 'RequestBodyTooLargeAfterDecodingError'; return RequestBodyTooLargeAfterDecodingError; })(); /** * The organization has reached the spend limit of its contract. */ export var ContractSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization has reached the spend limit of its contract. */ class ContractSpendLimitReachedError extends ErrorsRateLimitError { } /** @internal */ ContractSpendLimitReachedError._errorName = 'ContractSpendLimitReachedError'; return ContractSpendLimitReachedError; })(); /** * The organization has crossed the monthly API usage threshold of its API tier. */ export var EnforcedSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization has crossed the monthly API usage threshold of its API tier. */ class EnforcedSpendLimitReachedError extends ErrorsRateLimitError { } /** @internal */ EnforcedSpendLimitReachedError._errorName = 'EnforcedSpendLimitReachedError'; return EnforcedSpendLimitReachedError; })(); /** * The request would exceed a ramp limit, which caps how fast usage can grow. Retry * after the time in the `retry-after` header. */ export var RampLimitExceededError = /* @__PURE__ */ (() => { /** * The request would exceed a ramp limit, which caps how fast usage can grow. Retry * after the time in the `retry-after` header. */ class RampLimitExceededError extends ErrorsRateLimitError { } /** @internal */ RampLimitExceededError._errorName = 'RampLimitExceededError'; return RampLimitExceededError; })(); /** * The workspace's encryption settings could not be read, so the request was * refused. Retry in a few minutes. */ export var CMEKContextUnavailableError = /* @__PURE__ */ (() => { /** * The workspace's encryption settings could not be read, so the request was * refused. Retry in a few minutes. */ class CMEKContextUnavailableError extends ServiceUnavailableError { } /** @internal */ CMEKContextUnavailableError._errorName = 'CMEKContextUnavailableError'; return CMEKContextUnavailableError; })(); /** * The workspace's customer-managed encryption key could not be reached. Retry the * request; if this continues, check that the key is available in your key * management service, or contact Anthropic support. */ export var CMEKKeyUnreachableError = /* @__PURE__ */ (() => { /** * The workspace's customer-managed encryption key could not be reached. Retry the * request; if this continues, check that the key is available in your key * management service, or contact Anthropic support. */ class CMEKKeyUnreachableError extends ServiceUnavailableError { } /** @internal */ CMEKKeyUnreachableError._errorName = 'CMEKKeyUnreachableError'; return CMEKKeyUnreachableError; })(); //# sourceMappingURL=shared.mjs.map