Skip to content

Error codes

Generated from the error constructors in client/internal/cli/, client/internal/agent/ and core/sync/wire.go, and the status codes in server/internal/syncapi/. Do not edit.

Lasbolt has four sets of error codes. They are in different places: the JSON output of the CLI, the agent protocol, the answers of the server, and the result of a push.

CLI codes

With --json, a failed lasbolt command prints {"error": {"code", "message"}}. The MCP server uses the same codes. The exit code follows the code. The message below is the message from the source. Parts that change are shown as ….

CodeExitMessage in the source
agent1…
agent_path2…
agent_unavailable1the agent is not available: …
already_exists6… already exists (ID …): use lasbolt edit, or –if-missing
already_logged_in1this device is logged in as … on …: run lasbolt logout first
ambiguous_ref1field … matches … fields: use the field ID
approval_denied7the sign-in was denied in the browser
approval_expired7nobody approved the sign-in in time: call login again
approval_required7the user must approve this read in the Lasbolt web app (approval ID …). Ask the user to approve it, then call run again with the same arguments
approval_timeout7nobody approved the read in time (approval ID …)
bad_grant1the keys from the browser do not open: …
bad_key3the key string does not open the key: …
bad_passphrase1wrong passphrase for the local key store
bad_password1, 3that password does not unlock your keys
bad_server1the server sent a bad sign key
bad_server_answer1the server gave a bad user ID
bad_state1cannot make …: …
bad_totp1the one-time password secret of … is not valid
canceled1nothing changed
cancelled1the call was cancelled
conflict6the folder changed while it was purged (…): try again
error1the server sent a bad value
exec_failed1cannot run …: …
field_required2… names an item, not a field: add /<field>
invalid1the server refused the rotation: …
kdf1…
key_changed1the key of this device changed: run lasbolt peer list and compare the fingerprint again
key_mismatch1the sign key of your account on the server changed since the last login: stop and tell the server admin
keys_mismatch1the server gave two different user IDs. Stop and tell the server admin
keys_rotated9your keys were rotated on another device: run lasbolt unlock
keystore1…
kit_file1cannot make …: …
kit_file_exists1… exists: choose a new file name. lasbolt does not replace a file
kit_unreadable1the recovery kit does not open: …. Tell the server admin
locked9the key of the item does not open: …
login_required3the approval was for another account or device: run lasbolt logout, then lasbolt login …
needs_passphrase1the local key store needs a passphrase: …
nm_host1…
no_home1cannot find the home directory: …
no_key1the device … has no peer key yet
no_keys1the server gives no key bundle to this login
no_peer_list1there is no peer list yet: run lasbolt sync first
no_pin1the config has no user key: run lasbolt login again
not_found5not found
not_supported1the agent is not available on this platform: lasbolt runs in direct mode
outside_scope4this login has read access only
partial1(built at run time)
rate_limited8the server limits requests: …. Try again later
recovery_refused3the username or recovery code is not correct
refused1the rotation stops: end-to-end folder … does not open: …
relogin_required9a sign-in session unlocks with the master password only. Else run lasbolt login … and approve with “Also unlock encrypted folders”
reports(built at run time)
server_error1…
server_unavailable8the server has a problem: …
store_busy1another lasbolt process uses the local store: try again
unsynced_changes6… change(s) are not pushed to the server: sync first, or use –force to drop them
usage2the value of … is too long (at most … bytes)
weak_kdf1the server gave KDF parameters that are not safe: …
wrong_password2…

The exit codes are on the exit codes page.

Agent codes

The CLI and the apps talk to the local agent over a socket. A failed op answers with one of these codes. The CLI turns most of them into the CLI codes above, so the exit codes do not change.

CodeMeaning
api_errorThe server answered with an error. The status is in the answer.
approval_pendingA per-use approval waits for the user.
bad_passphraseThe passphrase of the key store is wrong.
bad_requestThe op request is not valid.
bad_urlThe page URL cannot be filled: it is not https or has no host.
internalThe agent failed in a way that it does not show.
login_requiredNobody is logged in.
needs_unlockThe local store is locked. Unlock it with the passphrase.
no_fieldThe item has no field of the requested kind.
protocolThe protocol version of the client and the agent differ.
rollbackAn end-to-end folder does not agree with a signed checkpoint.
unauthorizedThe server refused the token of this device.
unknown_opThe agent does not know the op. The client may be newer than the agent.
unreachableThe server cannot be reached.
url_mismatchThe item has no URL that fits the page.

Push codes

A push sends groups of ops. The answer has one result for each group. A failed group has one of these codes. The client acts as the table in the settlement rules of the design describes.

CodeMeaning
clock_skewThe clock of the op is too far ahead. The client gives new times and signs again.
conflictThe same op ID with other content. This is a bug. The client keeps the data and reports it.
cycleThe move would make a cycle. The client drops only that move op.
forbiddenThe role or the membership was lost. The client keeps the data locally as read only.
invalidThe shape or the signature rule failed. This is a bug. The client keeps the data and reports it.
not_foundIn purge results only. There is no such entity in the space.
parent_missingThe parent of a new entity is gone or purged. The client puts the entity in a folder “Recovered”, or keeps it locally.
purgedThe entity was purged. The client drops the group and tells the user.
waitingIn client reports only, not on the wire. The group waits for another device that must push the entity first.

Codes in API error bodies

A failed call of the sync API answers with {"error": "text"}. Some calls add a machine-readable code: in code (membership calls) or in error (read and approval calls, device-code login). A membership call may also answer with the reason of a rule of the membership log, such as last-owner or bad-signature: these reasons come from core/e2e.

CodeMeaning
access_deniedThe user denied the device-code login.
approval_decidedThe approval was decided before, or it ended.
approval_deniedThe user denied the approval.
approval_expiredThe approval ended before the read.
approval_not_neededThe item needs no approval. A device token of the user is never asked.
approval_rate_limitedToo many approvals were asked in a short time.
approval_requiredThe item needs a per-use approval. The answer has the approval ID. Wait, then call again.
authorization_pendingThe device-code login waits for the user to approve it in the browser.
device_onlyOnly a device token decides approvals.
e2e_itemThe item is end-to-end. Read it with the end-to-end path.
expired_tokenThe device code ended. Start the login again.
invalid_grantThe refresh token or the code is not valid. The session ended.
keys_pendingThe keys of the member in the log are not yet the keys on the server. Wait for the member to publish them.
needs_grantsAn end-to-end approval that only the web app can approve, because it must seal a key.
no_box_keyThe principal has no key to receive an end-to-end value.
not_headThe membership entry does not build on the newest entry. Read the log again, then sign again.
outside_scopeThe session or key may not read this item.
slow_downThe client polls too fast. Wait longer between calls.
stale_pinThe key that the client pinned for a user is out of date. Check the safety number again.

HTTP status codes

The sync API answers errors with these HTTP statuses.

StatusMeaning
400The request is not valid.
401There is no valid login, or the credentials are wrong.
403The login is valid, but it may not do this. The role, the scope or the access is too low.
404There is no such resource, or the caller may not see it.
409The state changed. Read again, then try again.
413The request body is too large.
422The request has the right shape, but a rule refused it.
429A rate limit applies. Try again later.
500The server failed. The log has the reason. The answer has no internal text.
501The server does not support this call.