Error codes
Every failure Tessera reports has a stable code, an HTTP status, a cause and a fix, and the full list is published at /errors.
On this page
Every failure Tessera reports has a stable code, an HTTP status, a cause and a fix, and the full list is published at /errors.
Use the code, not the message text, when your program decides what to do. Codes are never renamed or reused. New ones may be added.
Where you see a code
| Where | How it looks |
|---|---|
| Hosted pages (sign-in, consent, errors) | An "Error code" line the person can read out |
| Token, revoke, introspect and device endpoints | JSON with error, error_description, error_code and error_uri |
Redirects back to your app from /authorize |
Query parameters error, error_code, error_uri (and error_description sometimes), plus your state and iss, the issuer (RFC 9207). Check iss as you do on success |
| Admin API | A problem JSON object with title, status, detail, request_id, error_code and error_uri |
The tessera CLI |
With -o json, an object with error, kind, and code, cause, fix, docs when the server sent a code |
Example from the token endpoint:
{
"error": "invalid_grant",
"error_description": "refresh token has been revoked. ...",
"error_code": "refresh_token_revoked",
"error_uri": "https://docs.kurthlabs.com/tessera/errors/refresh_token_revoked"
}error is the standard OAuth value; branch on it if your library already does. error_code is more specific. One error value can have several codes: invalid_grant covers authorization_code_invalid, refresh_token_expired, refresh_token_revoked, code_verifier_invalid and others. error_description is for developers and may change.
Look codes up
- Browse: /errors, or open one code at
/errors/<code>, for example /errors/redirect_uri_mismatch. - As markdown, for tools and coding agents:
/errors/<code>.mdand the index at/errors/index.md. - As data:
/errors/errors.json. It hasversion,docs_baseand anerrorsarray. Each entry hascode,status,oauth_error(when the OAuth spec has a matching value),title,message,cause,fixanddetail. - Offline, from the CLI:
tessera errorslists every code andtessera errors <code>shows the cause and fix. See the CLI.
Each page says what the person sees, the cause, and the fix. The fix field is written to be acted on.
Common groups
This is a guide, not the list. The full list is at /errors.
Setting up the app
| Code | Usually means |
|---|---|
redirect_uri_mismatch |
The redirect_uri is not exactly one registered on the client (loopback IP literals such as http://127.0.0.1 match any port) |
redirect_uri_invalid |
The admin API refused a redirect URI you tried to register: not https, not loopback http, not a reverse-domain scheme, or it has a fragment or credentials. The problem detail names the entry |
client_not_found |
The client_id is wrong or belongs to another realm |
realm_not_found |
The realm name in the URL is wrong |
pkce_required |
The request has no S256 code_challenge, or the challenge is not 43 to 128 characters of the base64url alphabet |
state_required |
The request has no state |
scope_not_allowed |
A scope is not allowed for this client |
resource_invalid |
The resource is not one the client may request, or is missing for an MCP client. A plain sign-in app needs no resource; if it sends one, it must be its own client_id |
host_not_registered |
The address is not the shared issuer or an active login domain, so Tessera answers 404. See domains |
client_grant_not_allowed |
The client may not use this grant type |
Exchanging and refreshing tokens
| Code | Usually means |
|---|---|
authorization_code_invalid |
The code was used already, expired after 60 seconds, or the redirect URI differs. A code used twice also revokes the tokens the first exchange produced |
code_verifier_invalid |
The PKCE verifier is missing, is not 43 to 128 characters, or does not match |
client_authentication_failed |
Wrong or missing client secret. Send it in the request body or the Authorization header, never in the URL |
introspection_requires_confidential_client |
/introspect was called by a public client. Use a confidential client, or validate the JWT locally |
refresh_token_expired, refresh_token_revoked, refresh_token_invalid |
The session ended or the token was used twice; sign in again |
access_token_invalid |
A bearer token is missing, expired, revoked or for another audience |
Devices and agents
| Code | Usually means |
|---|---|
authorization_pending |
Keep polling; the person has not approved yet |
slow_down |
Poll less often. Add 5 seconds to your interval each time you see it |
device_code_invalid |
The device code is unknown or used. A pending code is also invalidated after repeated refused approvals |
device_code_expired |
Start a new device authorization |
assertion_untrusted, assertion_invalid |
A workload token is not from a trusted issuer or is malformed |
Signing in and limits
| Code | Usually means |
|---|---|
sign_in_failed, sign_in_expired |
The person's sign-in did not complete |
sign_up_not_allowed |
The realm is invite-only and this address has no invite |
client_access_denied |
The person lacks a role the app requires |
csrf_mismatch, form_malformed |
A hosted page's form expired or could not be read; reload the page and submit it again. Integrations must not post to hosted forms |
rate_limited |
Too many attempts; wait and retry (see Retry-After) |
server_busy, temporarily_unavailable |
Retry shortly |
server_error, internal_error |
A problem on Tessera's side; report the request_id if you have one |
What to do in code
invalid_granton a refresh: the grant is over. Clear your session and send the person to sign in.authorization_pendingandslow_down: keep polling the device endpoint, 5 seconds slower after eachslow_down.rate_limited,server_busy,temporarily_unavailable,server_error: retry with backoff.- Any other
400or401from/authorizeor/token: do not retry. Read the code's page; the request or the app's settings need to change.