@fkn/lib/messages
Variables
Section titled “Variables”ACCOUNT_CHANGED_MESSAGE
Section titled “ACCOUNT_CHANGED_MESSAGE”const ACCOUNT_CHANGED_MESSAGE: "fkn:account-changed" = 'fkn:account-changed';The account pin’s refusals, as message prefixes the broker throws. ACCOUNT_CHANGED_MESSAGE: the
signed-in account is not the one the pin was taken under. ACCOUNT_PIN_INVALID_MESSAGE: the api
could not read the pin. ACCOUNT_PIN_UNSUPPORTED_MESSAGE: a hop (the broker document or its shared
worker) predates the pin, so the call was refused rather than sent unpinned. None is a sign-out.
ACCOUNT_PIN_INVALID_MESSAGE
Section titled “ACCOUNT_PIN_INVALID_MESSAGE”const ACCOUNT_PIN_INVALID_MESSAGE: "fkn:account-pin-invalid" = 'fkn:account-pin-invalid';ACCOUNT_PIN_UNSUPPORTED_MESSAGE
Section titled “ACCOUNT_PIN_UNSUPPORTED_MESSAGE”const ACCOUNT_PIN_UNSUPPORTED_MESSAGE: "fkn:account-pin-unsupported" = 'fkn:account-pin-unsupported';E2E_INTEGRITY_MESSAGE
Section titled “E2E_INTEGRITY_MESSAGE”const E2E_INTEGRITY_MESSAGE: "fkn:e2e-integrity: stored data failed its integrity check" = 'fkn:e2e-integrity: stored data failed its integrity check';E2E_LOCKED_MESSAGE
Section titled “E2E_LOCKED_MESSAGE”const E2E_LOCKED_MESSAGE: "fkn:e2e-locked" = 'fkn:e2e-locked';E2E_RETIRED_FORMAT_MESSAGE
Section titled “E2E_RETIRED_FORMAT_MESSAGE”const E2E_RETIRED_FORMAT_MESSAGE: "fkn:e2e-retired-format: stored data is in a format this version no longer opens" = 'fkn:e2e-retired-format: stored data is in a format this version no longer opens';sealed in an envelope older than v3; distinct from integrity, since the bytes are intact
E2E_STALE_EPOCH_MESSAGE
Section titled “E2E_STALE_EPOCH_MESSAGE”const E2E_STALE_EPOCH_MESSAGE: "fkn:e2e-stale-epoch: this file is encrypted under a previous key you reset" = 'fkn:e2e-stale-epoch: this file is encrypted under a previous key you reset';STORAGE_ACCOUNT_CHANGED
Section titled “STORAGE_ACCOUNT_CHANGED”const STORAGE_ACCOUNT_CHANGED: "FKN_ACCOUNT_CHANGED" = 'FKN_ACCOUNT_CHANGED';The code of StorageAccountChangedError: a call made under one account was refused under another.
STORAGE_ACCOUNT_PIN_UNSUPPORTED
Section titled “STORAGE_ACCOUNT_PIN_UNSUPPORTED”const STORAGE_ACCOUNT_PIN_UNSUPPORTED: "FKN_ACCOUNT_PIN_UNSUPPORTED" = 'FKN_ACCOUNT_PIN_UNSUPPORTED';The code of StorageAccountPinUnsupportedError: the broker cannot pin calls, so none was sent.
STORAGE_NOT_FOUND
Section titled “STORAGE_NOT_FOUND”const STORAGE_NOT_FOUND: "FKN_STORAGE_NOT_FOUND" = 'FKN_STORAGE_NOT_FOUND';The error code for “there is no object at this path”, so a caller tests absence instead of parsing a message. osra drops custom codes at the SharedWorker boundary, so account-storage.ts’s rethrow re-mints it from the message on the app side.
STORAGE_UNREACHABLE
Section titled “STORAGE_UNREACHABLE”const STORAGE_UNREACHABLE: "FKN_API_UNREACHABLE" = 'FKN_API_UNREACHABLE';The error code for “the api never answered”. A caller that relaxes anything when the server is unreachable must never relax it on an answered error: an answered 500 lands exactly when a key rotation or a setting flip may be propagating. Across the SharedWorker hop the message prefix is the wire contract, since osra drops the code; same-realm callers can test the code.