Skip to content

Error codes

Every error response from Zautha is a problem details document (application/problem+json). Its code says what went wrong; its type is the address of the code’s page here.

{
"type": "https://zautha.com/docs/errors/form_password_incorrect",
"title": "Unprocessable Entity",
"status": 422,
"detail": "The password is incorrect.",
"code": "form_password_incorrect",
"errors": [{ "field": "password", "code": "form_password_incorrect", "message": "The password is incorrect." }],
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
  • code is stable: branch on it, never on title or detail, which are for people and may change.
  • errors is there when the problem concerns fields. Each entry names a field of the request, its own code and a message. A validation_failed problem lists every field that failed; most sign-in and sign-up errors name the one field they concern, with the same code.
  • trace_id identifies the request in Zautha’s logs. Quote it when you write to support.
  • A 429 carries a Retry-After header with the seconds to wait.
  • Some codes add a member of their own: reverification (reverification_required), tasks (session_task_pending) and invitation_status (organization_invitation_not_pending).

The SDKs turn these responses into errors: ZauthaApiError in @zautha/js and @zautha/backend, and ZauthaApiException in Zautha.AspNetCore, each with the status, the code, the field errors and the trace id.

CodeStatusMeaning
bad_request400The request could not be read.
unauthenticated401The request needs a signed-in user or a valid secret key.
forbidden403The caller is known but may not do this.
resource_not_found404Nothing with this id exists here.
method_not_allowed405The path exists, but not with this HTTP method.
conflict409The generic code of a 409 without a more specific code.
unsupported_media_type415The request body is not JSON.
payload_too_large413The request body is larger than Zautha accepts.
rate_limited429The generic code of a 429 without a more specific code.
internal_error500Something went wrong on Zautha's side.
request_timeout504Zautha did not finish the request in time.
erroranyThe response was not one of Zautha's problems.
validation_failed400One or more fields are not valid; errors[] names each one.
plan_limit_reached403A limit of the workspace's plan, or of a development instance, was reached.
too_many_requests429Too many requests in a short time; retry after Retry-After.
rate_limiter_unavailable503Zautha cannot check its rate limits right now, so it refuses the request.
instance_not_ready503The instance is still being set up.
idempotency_key_reused422This Idempotency-Key was already used for a different request.
idempotency_key_in_use409A request with this Idempotency-Key is still running.
origin_invalid400The request's Origin is not allowed for this instance.
cookie_invalid400The request carries a cookie name that Zautha refuses.
redirect_url_invalid400The redirect URL is not an allowed URL of this instance.

These codes appear only as the code of an entry in errors, inside a validation_failed problem (or, for a custom domain’s host, a domain_invalid one).

CodeStatusMeaning
invalid_value400A field's value is not one the field accepts.
invalid_length400A field's value is too short or too long.
invalid_range400A number is outside its allowed range.
invalid_origin400An entry of the allowed origins is not an origin.
invalid_redirect_uri400An OAuth client's redirect URI is not allowed.
required400A required field is missing.
too_many400A list has more entries than allowed.
CodeStatusMeaning
attempt_state_invalid422This step does not fit the sign-in or sign-up attempt's current state.
attempt_expired422The sign-in or sign-up attempt has expired.
form_param_invalid400, 422A parameter of the request is not valid for this step.
form_identifier_exists422An account already uses this email address.
form_identifier_not_found422No account has this email address or username.
form_username_exists422Another user has this username.
form_username_invalid422The username does not meet the rules.
form_email_invalid422This is not a valid email address.
form_password_length422The password is too short or too long.
form_password_pwned422The password appears in a known data breach.
form_password_context_word422The password contains a word from the account or the application.
form_password_incorrect422The password is not the account's password.
form_code_incorrect422The code is not correct.
verification_failed422The code was entered wrongly too many times.
verification_expired422The code or link has expired.
identifier_locked429This identifier is locked after repeated failures; retry after Retry-After.
user_banned403, 422The user is banned.
form_metadata_too_large422The metadata is larger than 8 KB.
form_ticket_invalid422The invitation or impersonation link is not valid any more.

Social sign-in, passkeys and bot protection

Section titled “Social sign-in, passkeys and bot protection”
CodeStatusMeaning
passkey_origin_unsupported422Passkeys cannot work on this page's origin.
form_passkey_invalid422The passkey could not be verified.
strategy_disabled422This social sign-in provider is not enabled on the instance.
oauth_access_denied422The user refused access at the social provider.
oauth_token_exchange_error422The social provider did not complete the sign-in.
oauth_fetch_user_error422The account at the social provider could not be read.
oauth_identification_claimed422The provider's email belongs to an account it cannot be linked to automatically.
external_account_exists422This social account already belongs to a user.
oauth_account_already_connected422This provider account is already connected.
captcha_required400This step needs the bot check, and no token was sent.
captcha_invalid400The bot check token was refused.
captcha_unavailable503The bot check cannot be verified right now.
CodeStatusMeaning
session_exists422The browser is already signed in.
reverification_required403The action needs the user to verify their identity again.
session_task_pending403The session has a task to finish before it gets a token.
CodeStatusMeaning
consent_request_invalid400The consent request is not a valid authorization request of this instance.
id_token_hint_invalid400The logout cannot be tied to the current session.
oauth_client_public422A public OIDC client has no secret.
CodeStatusMeaning
organizations_disabled403The instance has organizations turned off.
organization_minimum_permissions_needed422The change would leave an organization without anyone who can manage it.
organization_not_found404No organization has this id or slug in the instance.
organization_slug_taken409Another organization has this slug.
organization_slugs_disabled403The instance has organization slugs turned off.
already_organization_member409The user is already a member of the organization.
organization_membership_quota_exceeded403The organization has as many members and pending invitations as it may.
organization_role_in_use409The role is in use and cannot be deleted.
organization_system_permission_not_modifiable403System permissions cannot be changed or deleted.
organization_permission_limit_exceeded422The role has more custom permissions than fit in the session token.
organization_invitation_exists409This address already has a pending invitation to the organization.
organization_invitation_not_found404No invitation has this id or ticket.
organization_invitation_not_pending409The invitation is no longer pending.
organization_invitation_email_mismatch403The invitation is for another email address.
organization_creation_disabled403Users may not create organizations on this instance.
organization_creation_limit_exceeded403The user has created as many organizations as they may.
organization_delete_disabled403The organization's members may not delete it.
missing_organization_permission403The member's role does not have the permission this change needs.
personal_accounts_not_allowed422The instance requires every session to have an active organization.
CodeStatusMeaning
impersonation_forbidden403Impersonation is not allowed here.
impersonation_unavailable422This user cannot be impersonated as things stand.
actor_token_not_pending409The actor token is no longer pending.
CodeStatusMeaning
webhook_endpoint_limit422The instance already has its 20 webhook endpoints.
webhook_url_invalid422The webhook endpoint's URL is not allowed.

These come from the dashboard.

CodeStatusMeaning
domain_invalid400The domain is not valid.
format400The host is not a domain name.
apex400The host is a domain itself, not a subdomain.
reserved400The host is under a Zautha domain.
domain_already_active409This host is already the instance's active domain.
domain_managed409This instance's host is managed by Zautha.
production_exists409The application already has a production instance.
workspace_personal422A personal workspace cannot be deleted.
workspace_not_empty409The workspace still has applications.
workspace_locked403This workspace is managed by Zautha.
workspace_last_owner422The workspace would be left without an owner.
already_workspace_member409A member of the workspace has this email address.
workspace_invitation_exists409This address already has an invitation to the workspace.
workspace_invitation_invalid404The workspace invitation is no longer valid.
workspace_invitation_email_mismatch403The workspace invitation is for another email address.

These come from the dashboard’s billing page.

CodeStatusMeaning
billing_already_subscribed409The workspace already has a subscription.
billing_no_customer409The workspace has no billing account yet.
billing_email_in_use409This address is another workspace's billing email.
billing_email_not_allowed422The billing email must be a verified address of a workspace owner.
billing_provider_error502The payment provider could not be reached.