/** A key argument was passed but is `undefined`/`null`, empty, or not a string/number. */ export class InvalidKeyError extends TypeError { constructor(message: string) { super(message) this.name = 'InvalidKeyError' } } /** A remote storage could not be reached (network failure or 502/503/504). Writes may be retried later. */ export class StorageUnavailableError extends Error { constructor(message: string, options?: { cause?: unknown }) { super(message, options) this.name = 'StorageUnavailableError' } } /** A request was not authenticated (401) or not allowed for this caller (403). */ export class AuthError extends Error { constructor( readonly status: 401 | 403, message: string, ) { super(message) this.name = 'AuthError' } }