Recovery
Type Stability: stable
What happened when a stored document could not be read (ADR 010, theme 8). Exposed as
nabu.persistence.recovery and given to the onRecover option, so the host can tell the user.
Related guide: Persistence and sync →
Definition
TypeScript
import type { Recovery } from '@aionbuilders/nabu';TypeScript
interface Recovery {
at: number;
error: Error;
kind: 'empty' | 'backup';
quarantinedKey: string | null;
quarantinedKeys: string[];
}Properties
| Property | Type | Description |
|---|---|---|
at | number | epoch ms |
error | Error | why the latest stored snapshot was refused |
kind | 'empty' | 'backup' |
|
quarantinedKey | string | null | key (in the |
quarantinedKeys | string[] | every record moved aside (the backup too, when it was unreadable as well) |
Source: src/lib/persistence/recovery.js:2