Skip to contentMenu Download OpenVireo

Every error the SDK throws on purpose is an OpenVireoError with a machine-readable code. Errors from a server also carry the HTTP status, and are HttpErrors with the response body and retryAfter (seconds, from Retry-After). Messages are for people and may change; branch on code.

import { isOpenVireoError, isUnreachable } from "@openvireo/sdk";

try {
  await account.login({ email, password });
} catch (e) {
  if (isOpenVireoError(e, "invalid_secret_key")) {
    await account.login({ email, password, secretKey: await askForSecretKey() });
  } else if (isUnreachable(e)) {
    // no network, or a gateway answered 502/503/504: try again later
  } else {
    throw e;
  }
}

isUnreachable(e) is true for network_error and for 502, 503 and 504: the server couldn’t be reached, as opposed to refusing the request.

Signing in and sessions

CodeStatusMeaningWhat to do
unauthorized401Wrong email or password, a Secret Key that doesn’t match, or a session that is no longer validAsk again, or sign in again
invalid_secret_keyThe Secret Key is malformed, or this device has none for the accountAsk for the Secret Key (Emergency Kit)
mfa_requiredThe account has two-factor authentication and no code was givenPass totp
invalid_mfa401Wrong two-factor codeWith a totp function, login asks again by itself
mfa_expired401/410The sign-in timed out or the code was wrong too oftenStart the sign-in again
session_expired410The session, or a link such as a recovery link, expired or was usedSign in again
token_reused401A refresh token was used twice, a sign it was copied; the server ends the sessionSign in again; onSignedOut reports it
signed_outThe call needs a signed-in accountSign in first
weak_kdfThe account’s password hashing settings are below the minimum the client acceptsReport it; don’t continue
opaque_failedThe OPAQUE module couldn’t load or a protocol step failedCheck that the WASM module is bundled

Account recovery

See Account recovery for recovery_not_ready, recovery_cancelled, restore_locked and invalid_proof.

Vaults and sync

CodeStatusMeaningWhat to do
forbidden403The account or service account doesn’t have the role this needs (e.g. write for a change)Ask a vault manager for access
not_found404No such vault, entry, member, …
not_available_offlineOffline, and this vault was never synced on this deviceGo online once
vault_key_mismatchNone of the keys or passwords opens the server copySelf-hosted: ask for the database’s new password. Accounts: the keys are out of date; reload the vault list
no_vault_keyThe account holds no usable key for this vaultReload the vault list; ask a manager to share it again
too_many_conflicts412The vault kept changing during the sync, five times in a row. Local changes are keptSync again
server_rolled_backThe server returned an older copy than this device already synced: restored from a backup, or tampered withAsk the user; syncKdbx with acceptServerState: true merges anyway
server_lost_databaseThe server no longer has a database this device synced beforeAsk the user before uploading it again
vault_upload_failedimportVault created the vault, but the first upload failed (VaultUploadError, with .vault)e.vault.sync() later
kdbx_errorThe file couldn’t be read or written as KDBX, or the vault isn’t open
merge_failedThe merge couldn’t combine the two copiesReport it, with the databases if possible

References and entries

CodeMeaning
invalid_referenceNot a valid ov:// reference (empty segment, bad percent-encoding, missing field)
entry_not_foundNo entry, or several, match the reference; use the entry UUID when titles repeat
conflict (409)create: "only" and the entry exists; on the server, also an email that is taken or a key version that moved on

HTTP and transport

Server errors keep the server’s code; without one, the status decides:

StatusCode
400invalid_request
401unauthorized
403forbidden
404not_found
409conflict
410gone
412precondition_failed
428precondition_required
429rate_limited (see retryAfter)
5xxserver_error

network_error means the request never got an answer, and aborted that your AbortSignal cancelled it.

Crypto

decryption_failed, unsupported_version, invalid_public_keys, invalid_token and low_order_point mean data didn’t decrypt or verify: wrong key, corrupted data, a malformed token, or keys whose signature doesn’t match. They shouldn’t happen in normal use. Don’t retry them; report them.

The SDK docs cover OpenVireo SDK, develop (86e6cd2), last updated 26 October 2026. Found a mistake? Edit this page on GitHub.