Skip to Content

ApiErrorReasonSchemaByCode

const ApiErrorReasonSchemaByCode: object;

The reasons an error code can carry. A reason narrows what the code means, so it is only valid under the codes listed here; the status of the response decides how a client reacts: 401 means the presented credential is dead, 402 means buy something, 403 means the credential is valid but the principal may not act, and 409 means the current state forbids the operation.

Type Declaration

CONFLICT

readonly CONFLICT: ZodEnum<{ app_user_id_taken: "app_user_id_taken"; checkout_in_progress: "checkout_in_progress"; customer_access_revoked: "customer_access_revoked"; customer_suspended: "customer_suspended"; default_product_grant: "default_product_grant"; default_product_in_use: "default_product_in_use"; grant_already_active: "grant_already_active"; grant_not_cancelable: "grant_not_cancelable"; idempotency_key_reused: "idempotency_key_reused"; source_subscription_ambiguous: "source_subscription_ambiguous"; }>;

FORBIDDEN

readonly FORBIDDEN: ZodEnum<{ customer_suspended: "customer_suspended"; mode_not_in_scope: "mode_not_in_scope"; permission_missing: "permission_missing"; project_not_in_scope: "project_not_in_scope"; session_required: "session_required"; workspace_access_required: "workspace_access_required"; }>;

INTERNAL_ERROR

readonly INTERNAL_ERROR: ZodNever;

INVALID_REQUEST

readonly INVALID_REQUEST: ZodEnum<{ invalid_json: "invalid_json"; parameter_invalid: "parameter_invalid"; provider_missing: "provider_missing"; provider_unsupported: "provider_unsupported"; unsupported_endpoint: "unsupported_endpoint"; }>;

NOT_FOUND

readonly NOT_FOUND: ZodNever;

PAYLOAD_TOO_LARGE

readonly PAYLOAD_TOO_LARGE: ZodNever;

PAYMENT_REQUIRED

readonly PAYMENT_REQUIRED: ZodEnum<{ grant_expired: "grant_expired"; model_not_entitled: "model_not_entitled"; no_active_grant: "no_active_grant"; }>;

RATE_LIMITED

readonly RATE_LIMITED: ZodEnum<{ too_many_concurrent_requests: "too_many_concurrent_requests"; }>;

SERVICE_UNAVAILABLE

readonly SERVICE_UNAVAILABLE: ZodEnum<{ identity_provider_unavailable: "identity_provider_unavailable"; metering_unavailable: "metering_unavailable"; product_not_configured: "product_not_configured"; sign_in_not_configured: "sign_in_not_configured"; stream_authorization_unavailable: "stream_authorization_unavailable"; }>;

UNAUTHENTICATED

readonly UNAUTHENTICATED: ZodEnum<{ api_key_expired: "api_key_expired"; api_key_invalid: "api_key_invalid"; api_key_revoked: "api_key_revoked"; credentials_malformed: "credentials_malformed"; credentials_missing: "credentials_missing"; customer_access_revoked: "customer_access_revoked"; customer_deleted: "customer_deleted"; identity_provider_unmatched: "identity_provider_unmatched"; identity_subject_deleted: "identity_subject_deleted"; identity_token_expired: "identity_token_expired"; identity_token_invalid: "identity_token_invalid"; session_revoked: "session_revoked"; token_expired: "token_expired"; token_invalid: "token_invalid"; }>;

USAGE_LIMIT_EXHAUSTED

readonly USAGE_LIMIT_EXHAUSTED: ZodEnum<{ paid_credits_exhausted: "paid_credits_exhausted"; provider_quota_exhausted: "provider_quota_exhausted"; provider_spend_limit_exhausted: "provider_spend_limit_exhausted"; subscription_quota_exhausted: "subscription_quota_exhausted"; }>;
Last updated on