Iron Vault refuses things in two places, and each has its own vocabulary:
- Admin commands (
init, unlock, config approve, add and the rest) talk to the service over the admin
socket. A refused command ends with an error code: a stable number and name that scripts can act on, and a
message for you that may change between releases.
- Proxied requests get an HTTP status with a short fixed body. The audit log records the same request with a
reason that says exactly which check refused it.
Terms follow the glossary. The audit log reference lists every log field, and the
service states page explains Locked, Checking, Ready and Unavailable, which many of these errors name.
The CLI prints a refused command as one line on stderr and exits with status 1:
iron-vault: the service answered error 13 (wrong-state): ...
The number and the name are fixed; the text after them is the service’s message. A message never repeats a secret or
passphrase you typed, so it is safe to paste into a ticket, though it may name routes, credentials and hosts. For
three codes the CLI adds a line saying what to do: not-admin-principal, unsupported-version and
memory-unprotected.
The other exit statuses are 0 for success, 2 for a usage error caught before anything was sent, 3 when no answer
came back (the service is not running, this account may not connect, the exchange failed, a prompt got no value, or a
secret value the service sent could not be shown on a terminal), and 4 when status found the service in a state
other than Ready, or list found no vault open.
config check never reaches the service, so it has no error codes. It exits 0 for a config that parses and validates,
1 for one that does not (the line on stderr names the key, line and column), and 2 when the file cannot be read or is
longer than 61440 bytes. A config that passes can still be refused by config approve with config-invalid, because
only the service can check the credentials, accounts and upstream settings.
These can happen on any command.
| Code | Name | Meaning | What to do |
1 | unsupported-version | The CLI and the service speak different admin protocol versions. | Install the same release of the CLI and the service. In a protected install both are /usr/bin/iron-vault, so this means a service still running the old binary: restart it. |
2 | malformed-frame | A message on the admin socket broke the protocol’s rules. | This is a bug, or something other than the iron-vault CLI is talking to the socket. Report it with the command you ran. |
3 | unknown-command | The service does not know the command. | The CLI is newer than the service. Restart the service on the new binary. |
4 | unexpected-frame | A message arrived out of turn in the exchange. | As for malformed-frame. |
5 | not-admin-principal | The account you ran the command as may not use the admin socket. Nothing it sent was read. | In a protected install, run the command with sudo: only root is an admin principal. In a container, that is root on the host: run sudo iron-vault … on the host, against the bind-mounted admin socket. A plain docker exec arrives as the service’s own uid and is refused. In development, run it as the account that runs iron-vault serve. |
6 | busy | The service is already serving as many admin connections as it allows, or another command holds the lock this one needs. | Wait for the other command to finish, then try again. |
13 | wrong-state | The command is not allowed in the service’s current state. The message names the state. | See which commands run in which state. For example, unlock needs Locked, add needs Ready, and init needs Locked with no vault. |
| Code | Name | Meaning | What to do |
8 | declined | You did not type yes when asked to confirm you saved the recovery key. Nothing was written. | Run init again when you are ready to store the key. |
17 | already-initialized | The state directory already holds a vault, or files init did not write. Nothing was changed. | init never overwrites a vault. If you meant to start over, see Start over in development mode. If the key was already shown, discard it: it opens nothing. |
18 | passphrase-rejected | A passphrase broke a rule: it is under 12 characters, the two copies differ, or the vault and approval passphrases are the same. The message names the rule. | Choose a passphrase that meets the rule. |
19 | init-failed | A write failed. The message names the step. | Fix the cause the message names, then run init again: it discards the unfinished vault first. Discard the recovery key shown, unless the message says to keep it until the re-run decides. |
27 | memory-unprotected | A protected or container install’s memory is not locked against swap, so init would put the new keys and passphrases in swappable memory. Nothing was written, and no prompt was shown. | Raise the memory-lock limit as for unlock (see unlock), restart the service and run init again. |
| Code | Name | Meaning | What to do |
14 | unlock-denied | The vault passphrase was wrong. | Try again. After 5 wrong passphrases the attempt limit applies (unlock-rate-limited). |
15 | unlock-failed | The vault did not open for a reason other than the passphrase, such as a damaged or unreadable file. The service stays Locked. | Read the message and the log’s vault.* events. iron-vault recovery check tells you whether the recovery key still opens the vault. |
16 | unlocked-unavailable | The vault opened, but the config check failed, so the service is Unavailable. The message names the redacted reason. | Run status, and read the config.check-failed event in the log. For policy invalid, approve a good config with config approve. |
27 | memory-unprotected | A protected or container install’s memory is not locked against swap, so the vault was not opened. The service stays Locked. recovery check refuses with this code too. | Raise the memory-lock limit: LimitMEMLOCK=infinity on the systemd unit, or ulimits: memlock: -1 under Docker Compose. Then restart the service and unlock again. |
34 | unlock-rate-limited | Too many wrong vault passphrases, here or in migration authorization. No prompt was sent. The message gives the seconds to wait. | Wait that long. The cooldown starts at 30 seconds and doubles up to 15 minutes. lock does not clear it. |
The checks before the first prompt are unlock’s, except that the attempt limit is the recovery key’s own. Every
refusal leaves the vault files as they were, and the service Locked.
| Code | Name | Meaning | What to do |
13 | wrong-state | The service is not Locked. | Run iron-vault lock first, then unlock --recovery. |
14 | unlock-denied | The key does not open this vault, or opens it but is not one of its recovery keys. | Find this vault’s recovery key. If none is left, see Reset the vault. After 5 wrong keys the recovery key attempt limit applies. |
15 | unlock-failed | The vault is not initialized, a file could not be read or is malformed, the inventory check could not write, or a write step failed. For a write step, the message says which vault passphrase opens the vault now. | Read the message and the log’s vault.recovery-unlock-failed. After a failed write step, run unlock --recovery again. |
16 | unlocked-unavailable | The new vault passphrase is in force, but the config check after it left the service Unavailable. | As for unlock: run status, and read config.check-failed in the log. |
18 | passphrase-rejected | The new vault passphrase is under 12 characters, its two copies differ, or it opens an approver key. The message names the rule. | Run the command again with a passphrase that meets the rule. |
27 | memory-unprotected | As for unlock. | As for unlock. |
30 | recovery-key-invalid | The text is not a recovery key: it does not look like AGE-SECRET-KEY-1.... No passphrase was asked for. | Check you pasted the whole key. This does not count as a wrong key. |
34 | unlock-rate-limited | Too many wrong recovery keys. Wrong vault passphrases do not count here. The message gives the seconds to wait. | Wait that long. The cooldown starts at 30 seconds and doubles up to 15 minutes. |
38 | recipient-set-invalid | The vault already has 64 recipients, so the new vault passphrase cannot be enrolled. | Remove a recipient you no longer need with recipient remove. That needs the approval passphrase. |
39 | recipient-inventory-damaged | The recipient inventory (recipients.age) is missing or damaged, so the other recipients could not be kept. | Do not delete or rewrite either file. With the vault passphrase lost, the way out is reset. |
| Code | Name | Meaning | What to do |
7 | config-invalid | The proposed config does not parse, does not validate, or would not activate. Nothing was reserved, and the active config is unchanged. | Fix what the message names and approve again. A common case: a route sends a credential to a host its record does not permit, which only replace can change. |
8 | declined | You did not type yes at the summary. | Nothing was changed. |
9 | approval-denied | The approval passphrase did not open the approver key, the key it opened is not the vault’s pinned approver, or the TPM refused a TPM approver’s PIN. Nothing was reserved. | Type the approval passphrase, not the vault passphrase. For a TPM approver, type its TPM approval PIN; each wrong PIN counts against the TPM’s lockout, so stop after one miss. |
10 | approval-unavailable | The service cannot run an approval now, no pinned approver can be asked on this install, the TPM signing helper refused a TPM approver for a reason other than its PIN or a lockout (the message names its status), or a lock cancelled the approval at its prompt. No version was reserved. | Read the message; the service may be in a state that cannot approve. Try again once status shows Ready, or Unavailable with policy invalid. |
11 | approval-failed | The approval failed after it reserved a version and before it committed. That version number is used up. | Read config.approval-failed in the log for the step, fix it and approve again. The next approval gets a higher version. |
12 | committed-not-active | The approval committed, but it was not published or did not activate, so the service is Unavailable. | Run status and read config.activation-failed in the log. Approve a corrected config to recover. |
| Code | Name | Meaning | What to do |
20 | name-taken | add: a credential of that name exists, healthy or damaged. add never overwrites. | Use replace to change it, or choose another name. |
21 | credential-invalid | add, replace, rm: the name, an origin or the secret breaks its rule. The message names the rule, never what you typed. | Fix the argument. Names are what routes reference; origins are host or host:port, without a scheme. |
22 | vault-write-failed | add, replace, rm, recipient remove: writing the vault failed. The message says whether the change may have committed. | Run list to see what the vault now holds, fix the cause (often disk space or permissions) and retry. |
23 | unknown-credential | replace, rm: no credential of that name. | Check the name with list. |
24 | credential-in-use | replace, rm: a route of the active config uses the credential and would not activate after the change, or the credential is the client record of an OAuth account record. For rm the message names each route; for replace, each route and why; for a client record, the account record. login: a route that uses the account record would not activate with the requested origins. | For rm, approve a config without those routes first. For replace, give origins that still suit the routes. For a client record, remove the account record or sign it in again with another client first. For login, ask for origins that still suit the routes. |
9 | approval-denied | replace, rm, recipient remove: the approval passphrase was wrong, or opened a key that is not the asked approver’s. Nothing was written. | Type the approval passphrase. |
10 | approval-unavailable | replace, rm, recipient remove: owner presence could not be checked, or a lock cancelled the change at its passphrase prompt. Nothing was written. | Unlock if needed, and run the command again. |
12 | committed-not-active | replace, rm: the change committed, but the config check after it left the service Unavailable. | Run status and read the log’s config.check-failed. |
26 | list-too-large | list: the credential list does not fit one admin message. The message gives the count. | Remove credentials you no longer need. |
| Code | Name | Meaning | What to do |
25 | random-source-failed | The operating system’s random source failed, so no token was made. | This points to a broken host. Check the kernel log; do not work around it. |
| Code | Name | Meaning | What to do |
30 | recovery-key-invalid | The text is not a recovery key: it does not look like AGE-SECRET-KEY-1.... | Check you pasted the whole key from where you stored it. |
31 | recovery-check-failed | The key does not open this vault. | This is not the key for this vault. Find the right one; if you cannot, the vault has no working recovery key. See Check and store your recovery key. |
32 | recovery-check-unavailable | The vault is not initialized, or a file the check reads could not be read or is malformed, so the key was not judged. | Read the message, which names the file and error kind. |
| Code | Name | Meaning | What to do |
8 | declined | recipient add --recovery: you did not type yes when asked to confirm you saved the new recovery key. Nothing was changed, and the key shown opens nothing. | Discard the key shown, and run the command again when you are ready to store a new one. |
35 | recipient-invalid | The key is not an age1... X25519 recipient key, or (for recipient add) the label breaks its rule. The message names the rule. | Copy the key from recipient list, or check the key and the label you typed. |
36 | recipient-enrolled | recipient add: the key is already enrolled. It was refused before any prompt. Nothing was changed. | Run recipient list to see the enrolled keys. |
37 | unknown-recipient | recipient remove: no enrolled recipient has this key. Nothing was changed. | Run recipient list and copy the key from it. |
38 | recipient-set-invalid | recipient add: the set after the change would break the independence rule or hold more than 64 recipients. recipient remove: the vault would be left without its operational recipient or without a recovery recipient, or, in a Protected or Container service, the key is the host-unlock recipient whose identity the unlock handoff holds. The message names which part. Nothing was changed. | Read the message. The vault always needs its operational recipient and one recovery recipient. To replace the host unlock identity, enrol the new one with recipient add --host-unlock and restart until the stack reaches Ready with no unlock, then remove the old one. To retire host unlock, stop and disable the handoff unit and remove its credential first. |
39 | recipient-inventory-damaged | The recipient inventory (recipients.age) is missing or damaged, or does not describe the identity.age on disk. The message names the damage. Nothing was changed, and the service stays Ready. | Do not delete or rewrite either file. A vault initialized before recipient commands has no inventory, and the message says so. Keep your recovery key, which opens the vault without the inventory. |
All three commands also answer wrong-state outside Ready, busy while another command holds the service-wide lock, and
vault-write-failed when settling a staged recipient change failed or, for recipient add and recipient remove, the
change itself did; the message says whether it may have committed.
| Code | Name | Meaning | What to do |
52 | machine-not-forgotten | The key is still a recipient of the vault. The message gives its role and says to run recipient remove with the same key. Nothing was changed. | Run the command the message names, then forget-machine again. If recipient remove refuses because the key is this machine’s own host unlock identity, run forget-machine on the vault that stays. |
forget-machine also answers recipient-invalid for a key that is not an age1... recipient key, wrong-state
outside Ready, busy while another command holds the service-wide lock, recipient-inventory-damaged and vault-write-failed as the
recipient commands do. A warning (a recovery check that is overdue, has never run or is not on record, or a broken
independence rule) is not an error: it goes to stderr and the exit status is 0.
login signs a provider account in to an OAuth account record, under a new name or over an account record. Signing
the same account in again through the same client needs no approval passphrase; another account or client, or an
added scope or origin, does. A name that holds any other record, or a damaged one, answers name-taken. When a login
is refused, no record changes.
| Code | Name | Meaning | What to do |
53 | not-implemented | The service knows the command but this build does not carry it out. Nothing was changed. No command answers it in this release. | Check that the CLI and the service are the same release. |
54 | client-invalid | --client names no credential, a damaged one, or one that is not an OAuth client record. | Check the name with list; enrol the client first. |
55 | address-invalid | The pasted address does not parse, is not the redirect address the consent URL named, or lacks exactly one state and one code. | Run login again and paste the whole address from the browser’s address bar. |
56 | state-mismatch | The pasted address belongs to another login: its state is not the one this exchange made. | Run login again, and paste the address from the consent URL this run showed. |
57 | consent-refused | The pasted address carries an error: you or the provider refused consent. The message is fixed: it never repeats what you pasted. | Run login again and approve the consent screen. |
58 | provider-request-failed | The token request or the account request failed, was refused, or its response did not parse, or its answer has no refresh token. The message names the request (token or account) and the HTTP status or error kind, never a response byte. | Check the network and the client record, then run login again. A refused code cannot be redeemed twice. |
59 | account-unverified | The provider’s answer does not prove which account signed in. | Check that the client record’s provider definition matches the provider, then run login again. |
60 | account-mismatch | The account the provider verified is not --account. | Sign in to the browser as the account you named, or name the account you meant. |
61 | scopes-missing | The provider granted fewer scopes than you asked for; the message names the missing ones. Google lets you untick scopes. | Run login again and leave every requested scope ticked. |
62 | account-taken | Another account record already holds this account with this client. | Use that record, or remove it with rm before signing in under a new name. |
login also answers wrong-state outside Ready, busy while another command holds the service-wide lock,
name-taken when the name holds a record that is damaged or not an OAuth account record, credential-in-use when a
route that uses the account record would not activate with the requested origins, credential-invalid for a name,
scope or origin that breaks its rule or the client’s provider definition, approval-denied, approval-unavailable and
tpm-locked-out when owner presence fails, random-source-failed, and vault-write-failed and
committed-not-active as replace does.
| Code | Name | Meaning | What to do |
40 | approver-invalid | approver add: the label breaks its rule. approver remove: the ID is not a version 4 UUID. The message names the rule. Nothing was changed. | Give a label of 1 to 64 bytes with no control characters, or copy the approver ID from approver list. |
41 | unknown-approver | approver remove: no pinned approver has this ID. It was refused before any prompt. Nothing was changed. | Run approver list and copy the ID from it. |
42 | approver-set-invalid | approver add: 16 approvers are already pinned. approver remove: it is the last approver. export: no software approver is pinned, and a TPM approver’s key cannot move to another machine. Each was refused before any prompt. Nothing was changed or exported. | For add, remove an approver you no longer use first. The last approver stays: enroll another one before you remove it. For export, enroll a software approver with approver add first. |
43 | approver-in-use | approver remove: this approver signed the active approval, and removing it would stop the active config verifying and take every route down. It was refused before any prompt. Nothing was changed. | Approve the config again with another approver (switch to it at the prompt), then remove this one. |
44 | approver-kind-unavailable | This install does not offer that signer kind, or cannot make that kind of signer now. software is always offered; tpm only on a protected or Compose install whose TPM signing helper socket exists; hardware is not built yet. For tpm, the message names why the helper refused (a lockout is tpm-locked-out, below). Nothing was changed. | Leave out --kind, or use --kind software. For tpm, fix what the message names, such as raising the TPM’s dictionary-attack lockout interval to at least 600 seconds. |
9 | approval-denied | The passphrase did not open the asked approver’s key. The vault passphrase and a recovery key never authorize an approver change. Any pinned approver may authorize a removal, the one being removed included. Nothing was written. | Type the approval passphrase of the approver the prompt names, or switch to another approver. |
10 | approval-unavailable | Owner presence could not be checked, or a lock cancelled the change at its passphrase prompt. Nothing was written. | Unlock if needed, and run the command again. |
18 | passphrase-rejected | The new approval passphrase is under 12 characters, or the two copies differ. Nothing was written. | Run the command again and choose a passphrase that meets the rule, different from the vault passphrase. |
22 | vault-write-failed | The approval state (approval.age) did not read back before any prompt, or the enrollment or removal failed. The message says whether it may have committed. | When the message says nothing was changed, read the log’s approver.change-failed and fix its cause. When it may have committed, check the approvers before trying again. |
Both also answer wrong-state outside Ready (approver add also when a lock cancels it at the new passphrase
prompt), and busy while another command holds the service-wide lock.
| Code | Name | Meaning | What to do |
51 | tpm-locked-out | config approve, replace, rm, recipient remove, recipient add, approver add, approver remove and export: the TPM is in dictionary-attack lockout, or the signing helper is holding back its share of the tries to keep the rest for other users of the TPM. The message gives the whole seconds to wait. Nothing was reserved, signed or changed. | Wait that long, or switch to another approver at the prompt (the software approver is unaffected). The TPM forgets one wrong try per lockout interval. |
| Code | Name | Meaning | What to do |
49 | nothing-to-reset | No vault file is there, at the request or after you confirmed. The message says to run init, or names the first file that is there and says to move it aside first. Nothing was removed. | Run iron-vault init, or move the named file aside. |
50 | reset-failed | Writing the reset marker or removing a file failed. The message says whether the vault is intact (the marker was not written) or the next reset finishes the job. | Fix the cause the message names, then run iron-vault reset again. status shows reset unfinished until it ends. |
reset also answers wrong-state in Starting, Checking and Stopped, and declined when what you typed does not
match, or when the vault changed between the summary and your confirmation. When stdin is not a terminal or /dev/tty
cannot be opened, the CLI exits with 3 before it connects.
recipient add and export share these codes.
| Code | Name | Meaning | What to do |
28 | migration-denied | Migration authorization was refused: the vault passphrase or TPM approval PIN was wrong, the envelopes the passphrase opened are not this vault’s, or the authorization expired, was used already or is for another operation. Nothing was exported or rewrapped. | Start the command again with the right vault passphrase or PIN. Each wrong PIN counts against the TPM’s lockout. |
29 | migration-unavailable | Migration authorization could not be checked (for a TPM approver, the message names the signing helper’s status), no method could be asked, or a lock cancelled the command at its authorization prompt, or at export’s export passphrase prompts. Nothing was exported or rewrapped. | Read the message and try again, or switch to the vault passphrase at the prompt. |
33 | migration-rate-limited | Too many wrong vault passphrases in a row. The message gives the seconds to wait. | Wait that long. The limit is the one unlock shares. |
export raises export-failed; import raises the other three. import also answers declined, already-initialized,
passphrase-rejected, memory-unprotected and wrong-state as init does, and busy while another init or import
holds the service. export also answers passphrase-rejected when the export passphrase is
under 12 characters or its two copies differ, and wrong-state outside Ready.
| Code | Name | Meaning | What to do |
45 | export-failed | export: the snapshot checks found damage before any prompt, or the snapshot or the transfer failed after you authorized it: a deadline passed, or a lock cancelled it between frames. The message names the step and, for a file, its name and the error kind. No bundle was completed. | Read the message, fix what it names, and run export again. |
46 | bundle-invalid | import: the bytes are not a migration bundle this version reads, are larger than the limit, or fail a check with the vault identity. The message names the rule or check, never a byte of the bundle. Nothing was written. | Export the bundle again from the source with a matching version. |
47 | import-denied | import: the export passphrase does not open the bundle’s identity envelope. Nothing was written. | Run import again with the passphrase chosen at export. |
48 | import-failed | import: --host-unlock was asked for and the service has no host unlock identity to enrol (a build or profile without host unlock, an absent handoff, or one that is not trusted), raised before any prompt so nothing was written; or a write failed. The message names the reason or the step. | For a missing host unlock identity, provision the handoff and run import again, or run it without --host-unlock and enrol later with recipient add --host-unlock. For a failed write, run import again: it discards the unfinished import. Follow the message’s advice about the recovery key shown. |
A refused request gets one of these statuses. Each status has one short fixed body, whichever check refused the request, so a
caller learns nothing about other callers’ routes. The reason is in the log’s request.completed record, never in
the response. A refusal before the route’s credential is added sends nothing upstream.
| Status | Body | reason values |
400 | bad request, or for a request form the service does not accept, the rule broken (below) | connect_not_supported, not_origin_form, upgrade_not_supported, unsupported_version, bad_target, bad_method, bad_header, ambiguous_framing, foreign_marker, malformed_marker |
401 | unauthorized | unauthenticated |
403 | forbidden | not_granted, method_not_allowed, path_not_allowed |
404 | not found | no_route |
408 | empty | request_timeout |
413 | empty | request_too_large |
429 | too many requests, with Retry-After in whole seconds | rate_limited |
500 | internal error | service_defect |
502 | bad gateway | upstream_connect, upstream_tls, upstream_protocol, upstream_body, unsupported_coding, redirect_refused |
503 | the unavailable reason (locked, policy invalid, checking or recovery needed), or service unavailable | locked, policy_invalid, checking, recovery_needed, withdrawn, route_unavailable, credential_unavailable, credential_needs_login, token_unavailable, credential_unusable |
504 | gateway timeout | upstream_timeout |
reason | Cause | What to do |
connect_not_supported | A CONNECT request. The body is CONNECT is not supported. | Iron Vault is a base-URL proxy, not a forward proxy. Point the application’s base URL at the route prefix instead of setting HTTPS_PROXY. |
not_origin_form | The request target is not a path such as /route/..., for example a full URL. The body is the request target must be origin-form. | As above: use the route prefix as the base URL. |
upgrade_not_supported | A protocol upgrade, such as WebSocket. The body is protocol upgrades are not supported. | Not supported in v0. |
unsupported_version | Not HTTP/1.0 or HTTP/1.1. The body is only HTTP/1.0 and HTTP/1.1 are supported. | Configure the client for HTTP/1.1. |
bad_target | The path or query broke a rule, such as a .. segment or an encoded separator. | Fix the URL the application builds. |
bad_method | The method is not one a route may allow. | Use a standard method. |
bad_header | A request header could not be read. | Fix the client. |
ambiguous_framing | The request’s length is ambiguous, for example both Content-Length and Transfer-Encoding. | Fix the client. |
foreign_marker, malformed_marker | The request holds a credential placeholder that is not this route’s, or is malformed. | Check the placeholder the application sends where its API key goes. |
Status and reason | Cause | What to do |
401 unauthenticated | No caller token, a wrong one, or a peer account no caller names. | Send the token in Proxy-Authorization: Bearer <token>, or in the listener’s token_header. After a token rotation, the old one stops working at once. |
403 not_granted | The caller is known but its routes do not include this route. | Grant the route in the caller’s table and approve. |
403 method_not_allowed | The route’s methods do not allow this method. | Widen methods, or call it differently. See Widen or narrow a route. |
403 path_not_allowed | The route’s paths do not match. Patterns match the path after the route prefix, as the provider documents it, without the upstream’s base path. | Check paths against the path you call after the prefix; leave the upstream’s base path out. |
404 no_route | No route has this prefix. Every caller gets the same answer, so it reveals nothing about other callers’ routes. | Check the prefix in the URL. |
An upstream’s own 401 is relayed as it came, with outcome success and no reason. On a route that names an OAuth
account, Iron Vault also drops the access token that request carried, so the next request refreshes it once the
provider’s minimum retry interval has passed. It never sends the request again.
Status and reason | Cause | What to do |
413 request_too_large | The request body is over max_request_body_bytes, declared or as it streamed. | Send less, or raise the limit in [limits] and approve. |
408 request_timeout | The service had not answered within request_timeout_secs. | Check the upstream’s latency, or raise the limit in [limits] and approve. |
429 rate_limited | The route’s or caller’s token bucket is empty. Retry-After says when a request will pass. | Wait, or raise rate_limit and approve. |
service_defect means a final check that should never fail did. Nothing was sent upstream. It is also logged as
request.defect at ERROR, with the label of the check. Report it as a bug with that record.
Status and reason | Cause | What to do |
502 upstream_connect | The service could not connect to the upstream. | Check DNS and the network from the service’s host. |
502 upstream_tls | The upstream’s TLS certificate did not verify. | Iron Vault never skips verification. For a private CA, set the route’s ca_file. |
502 upstream_protocol | The upstream broke the HTTP protocol. | Check the upstream URL is an HTTPS API. |
502 upstream_body | The upstream’s body stopped before its end. | Usually the upstream’s problem; retry. |
502 unsupported_coding | The response uses a content coding the scrubber cannot decode, so it could not be screened for secrets. | The service decodes gzip, deflate and br. Ask the upstream for one of those, or for none. |
502 redirect_refused | The upstream redirected outside the route’s upstream base path, or sent an ambiguous Location. | Expected for a redirect that could land in another route. A redirect to another site is passed through instead. |
504 upstream_timeout | The upstream sent no response headers within upstream_timeout_secs, or before the request deadline. | Check the upstream, or raise the limit in [limits] and approve. |
When the service is not Ready, every request gets 503 before any caller is identified, and the body is the reason
itself:
| Body | reason | Meaning | What to do |
locked | locked | The service is Starting or Locked. | iron-vault unlock. |
checking | checking | A config check is running: after an unlock, a reload, an approval or a credential change. | Retry in a moment. |
policy invalid | policy_invalid | The config or its approval did not verify, for example after a hand edit. | Approve a good config: see Tamper detection and recovery. |
recovery needed | recovery_needed | Shared vault state is damaged, or a committed change is unfinished. | Read vault.shared-state-damaged or config.activation-failed in the log, and its remediation. |
When the service is Ready but this request cannot be served, the body is service unavailable:
reason | Meaning | What to do |
route_unavailable | The route cannot serve: its pinned CA did not load, or it has no upstream client. | status lists route faults; the log has route.pinned-ca-unavailable. |
credential_unavailable | The route’s credential record is damaged, or the OAuth client record an OAuth account names is missing or damaged. Other routes keep working. | status shows the credential as damaged; repair it with replace. |
credential_needs_login | The route’s OAuth account needs a new login. Other routes keep working. | status shows the credential as needing login, with its cause; sign in again. |
token_unavailable | The route’s OAuth account has no access token now: the last refresh failed, or an upstream 401 dropped the token, and the next refresh waits for the provider’s minimum retry interval. For a GitHub App account, also while an admin command holds the vault and the token has expired, or while a refreshed token waits for its refresh token to be written. | Retry after the provider’s minimum retry interval: 60 s for Google, 300 s for a GitHub App. If it persists, credential.refresh-failed or credential.refresh-write-failed in the log says why. |
credential_unusable | The record loaded but its kind could not produce the request’s credential. | Replace the credential with one of the right kind. |
withdrawn | The policy changed while the request waited, and its snapshot was withdrawn. | Retry. |
Some failures happen after the status line has gone to the caller. The status in the log is then that head’s, the
caller’s connection is cut, and the reason says why:
reason | Meaning |
body_corrupt | The upstream’s compressed body did not decode. |
body_truncated | The upstream’s body ended early. |
body_size_limit, body_ratio_limit | The decoded body passed the size limit or the decompression ratio limit. |
body_encode | Re-encoding the scrubbed body failed. |
upstream_body | The upstream’s body stopped. |
deadline | The request deadline passed while the body streamed. |
caller_gone | The caller closed the connection. |
service_closed | The service closed the connection: a lock, a stop, or a config change that dropped the listener. |
A few refusals happen before Iron Vault’s code sees a request, so they write no request.completed: hyper’s own 431
for oversized headers and 414 for an oversized target, a connection closed because max_connections are open (a
WARN diagnostic record), and a TLS handshake or header read that timed out.