Navigate the docs

For AI agents: the documentation index is at /llms.txt, and every page here has a markdown version at its URL plus .md.

Error codes

Sprott reports every refusal with a stable code and leaves upstream errors that are not its own unmarked. Codes are snake_case and never reused.

Where you see a code

WhereShape
A command run through sprott runThe response body starts with Sprott: <code>: <message>, and carries the header x-sprott-error: <code>. The body is plain text, so it is never mistaken for the service's own reply.
The daemon's local APIRFC 9457 application/problem+json with type (https://sprott.ai/errors/<code>), title, status, detail, and the extensions code, action and cause.
CLI output<code>: <message> on stderr.

action says what to do next:

  • unlock: unlock the vault;
  • approve: open the approval link in the body;
  • retry: try again;
  • configure: change the setting the message names;
  • fix_request: change the request;
  • none: a deliberate refusal; don't work around it.

cause says whose problem it is: request, auth, vault, policy, config or internal. environment and upstream are not Sprott problems; Sprott reports them because it saw them happen.

Codes

Vault and setup

CodeStatusWhat it meansWhat to do
vault_locked423The vault is locked.Run sprott unlock, then retry.
no_vault403No vault is bound to the request.Route credential traffic with sprott run.
vault_access_revoked403This account is no longer a member of the vault.Ask a vault admin to add it back.
vault_deleted410The vault was deleted.None.
vault_key_changed409The vault's members changed and its key was replaced, and this device doesn't have the new key yet; or a secret the request needs is unset or in a row this device can't read (the message names it); or this device's copy of the vault is behind (a change could not be applied here).Run sprott unlock.
team_lease_expired403This machine has not reached the cloud for too long, so the shared vault's credentials stop serving.Restore the network; it serves again once it reconnects.
ledger_stale423Sprott could not reach your account for 7 days, so vaults are locked. Data stays.Check the network, then sprott up.
upgrade_required426This vault needs a newer Sprott.Run sprott upgrade.

Identity

CodeStatusWhat it meansWhat to do
unauthorized401The request carries no valid agent identity or credential.Run the agent through sprott run, or set it up with sprott agent add.
agent_key407A request with a phantom has no verified agent identity.Run the agent through sprott run; set it up with sprott setup --agent-name <name>.
agent_not_admitted403The agent proved who it is, but your account does not admit it (never approved, or removed). It is refused on every vault.Run sprott setup --agent-name <name> or sprott agent add.
agent_not_in_account403The agent is not registered to the account this machine is signed in to.Run sprott agent add on this machine.
agent_not_authorized403The agent is not turned on for this vault.Turn it on in the vault's Agent access page; the message has the link.
mask_not_enabled403The connection exists, but is not turned on for this agent.The responsible member turns it on in the vault's Agent access page.
device_not_admitted403This machine needs to be paired again.Run sprott login.
ledger_device_revoked403This machine was removed from the account.Run sprott login to pair it again.
ledger_head_invalid403The account's device list does not match its signed head. The daemon keeps its previous view.None.

Approvals

CodeStatusWhat it meansWhat to do
approval_needed401Policy asks for an approval. The body has the approval link and the op id.Open the link, or run sprott op wait <op_id>, then retry.
approval_register503The approval request could not be opened.Retry.
approver_not_authorized403The person who approved is neither the requester nor an admin of this shared vault. The request stays pending.Ask the requester or an admin to approve.
grant_id_invalid403The approval's identity signature is missing, does not verify, or names someone other than the passkey's owner. The request stays pending.Approve again from the approval page.
wk_refused_v2400An approval delivered an unlock secret instead of the vault key and the approver's signature. The request stays pending.Reload the approval page and approve again.
batch_verify_failed409A batch approval could not be verified against the requests it covers.Approve again from the Approvals page.

Policy and hosts

CodeStatusWhat it meansWhat to do
policy_denied403A deny rule blocks this request.None.
host_not_anchored403The destination is not one of the connection's hosts. The body offers an approval to add it.Approve the new host, or fix the URL.
host_forbidden403The destination is a private or cloud-metadata address.None.
refresh_forbidden403A refresh token never leaves the vault.Use the connection's main phantom.
broker_body_limit413The request body is larger than the broker inspects.Raise --body-cap on sprott serve if the body is legitimate.
forbidden403Authenticated, but not allowed.None.

Phantoms and requests

CodeStatusWhat it meansWhat to do
unknown_connection400The phantom names no connection.Copy the phantom from sprott connection ls.
unknown_role400The phantom names a role its connection doesn't have. The message lists the connection's phantoms.Use one of them.
secret_not_set424A secret the phantom needs is in none of the vault's stores. The message names it.Set it (sprott set <KEY>), or use another phantom.
service_not_loaded409The connection's service is a vault definition this device does not load (the message says why).Fix or remove the definition (sprott service ls lists it).
phantom_unresolved424A phantom could not be resolved, so the request was blocked before it left.Check the name with sprott connection ls, or run sprott unlock.
ambiguous_phantom400A bare phantom on a connection with several values.Use the per-key phantom, __sprott__<conn>__<key>__.
multi_connection400One request named several connections.Send one connection per request.
phantom_plain_http400Phantoms need HTTPS.Use an https:// URL.
request_unreadable400The request can't be read the way its standard says, where a rule needs to read it: a malformed path escape, a body that isn't valid JSON, a GraphQL query that doesn't parse, a query parameter given twice. The message says which.Fix the request.
request_invalid422A GraphQL query that parses but isn't valid.Fix the query.
content_encoding_unsupported415The body uses a content coding other than gzip, deflate, br or zstd.Send it uncompressed or in one of those.
phantom_renamed400The request uses a phantom from before Sprott 2.0 (__sc__<conn>__).Use the name in the message (__sprott__<conn>__).
bad_request400Malformed request.Fix the request.
not_found404No such resource.Fix the request.
method_not_allowed405The local API accepts only GET.Fix the request.
conflict409State conflict.Fix the request.
rate_limited429Too many requests.Slow down.

Network and services

CodeStatusWhat it meansWhat to do
egress_unreachable502The daemon could not connect onward. Not a credential problem.Check the network, or sprott config set proxy <url> behind a corporate proxy.
upstream_error502The service answered, but the exchange failed. Not a credential problem.Retry.
upstream_body502The request body could not be read.Retry.
oauth_mint502The provider refused to issue a token.Retry; reconnect the account in the console if it keeps failing.
store_unavailable502An external secret store listed ahead of the value failed, or can't be used on this device.Retry; sprott log has the full error.

Internal

CodeStatusWhat it meansWhat to do
internal500Daemon failure.Retry; sprott log for details.
ca_unavailable500The local certificate authority could not be read.Retry; sprott restart.
secret_encoding500The stored value is not valid UTF-8.Store the value again.

Exit codes

All commands exit 0 on success, 1 on error and 2 on a usage error. sprott doctor exits non-zero if any check fails. sprott op wait has its own codes: CLI.

When there is no Sprott code

  • The command was not routed. Without sprott run, the phantom reaches the service as a literal string. The service refuses it (usually 401) and there is no Sprott: line. Check that the command runs under sprott run.
  • The daemon restarted and the vault was never unlocked. The broker can't recognise a connection's hosts until the vault has been unlocked once, so it passes that traffic through. Run sprott unlock. After the first unlock, a phantom sent while locked gets vault_locked.