Skip to Content

ApiErrorResponseSchema

const ApiErrorResponseSchema: ZodObject<{ error: ZodObject<{ code: ZodEnum<{ CONFLICT: "CONFLICT"; FORBIDDEN: "FORBIDDEN"; INTERNAL_ERROR: "INTERNAL_ERROR"; INVALID_REQUEST: "INVALID_REQUEST"; NOT_FOUND: "NOT_FOUND"; PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE"; PAYMENT_REQUIRED: "PAYMENT_REQUIRED"; RATE_LIMITED: "RATE_LIMITED"; SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE"; UNAUTHENTICATED: "UNAUTHENTICATED"; USAGE_LIMIT_EXHAUSTED: "USAGE_LIMIT_EXHAUSTED"; }>; message: ZodString; param: ZodOptional<ZodString>; reason: ZodOptional<ZodUnion<( | ZodEnum<{ invalid_json: "invalid_json"; parameter_invalid: "parameter_invalid"; provider_missing: "provider_missing"; provider_unsupported: "provider_unsupported"; unsupported_endpoint: "unsupported_endpoint"; }> | 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"; }> | ZodEnum<{ grant_expired: "grant_expired"; model_not_entitled: "model_not_entitled"; no_active_grant: "no_active_grant"; }> | 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"; }> | ZodNever | 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"; }> | ZodEnum<{ too_many_concurrent_requests: "too_many_concurrent_requests"; }> | 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"; }> | 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"; }>)[]>>; requestId: ZodString; requiredPermission: ZodOptional<ZodEnum<{ "accounts:read": "accounts:read"; "accounts:write": "accounts:write"; "api-keys:read": "api-keys:read"; "api-keys:write": "api-keys:write"; "backups:read": "backups:read"; "backups:write": "backups:write"; "customers:read": "customers:read"; "customers:write": "customers:write"; "logs:read": "logs:read"; "products:read": "products:read"; "products:write": "products:write"; "projects:read": "projects:read"; "projects:write": "projects:write"; "secrets-integrations:read": "secrets-integrations:read"; "secrets-integrations:write": "secrets-integrations:write"; "starred-items:read": "starred-items:read"; "starred-items:write": "starred-items:write"; "subscription-sign-ins:read": "subscription-sign-ins:read"; "subscription-sign-ins:write": "subscription-sign-ins:write"; }>>; }, $strip>; success: ZodLiteral<false>; }, $strip>;

The envelope a server sends, with the reason tied to its code.

Last updated on