Skip to content

@graphty/graphty-element / index / AutosaveCode

Type Alias: AutosaveCode ​

AutosaveCode = "E_AUTOSAVE_UNAVAILABLE" | "E_AUTOSAVE_KEY_AMBIGUOUS" | "E_AUTOSAVE_QUOTA" | "E_AUTOSAVE_STALLED" | "E_AUTOSAVE_CONNECTION_LOST" | "E_AUTOSAVE_TOO_LARGE" | "E_AUTOSAVE_FAILED" | "E_AUTOSAVE_ENTRY_TAKEN" | "E_AUTOSAVE_UNKNOWN_ENTRY" | "E_AUTOSAVE_FORMAT_NEWER" | "E_AUTOSAVE_RESTORE_CRASHED" | "W_AUTOSAVE_ORIGIN_EPHEMERAL"

Defined in: graphty-element/src/autosave/types.ts:150

Every code autosave reports, in AutosaveStatus.problem and its events. Switch on the code and write the words yourself; leave out a code you do not know, since codes may be added in a minor release.

CodeParamsWhen
E_AUTOSAVE_UNAVAILABLE{ api }IndexedDB is missing or throws on open
E_AUTOSAVE_KEY_AMBIGUOUS{ elements }a bare autosave on several elements without an id
E_AUTOSAVE_QUOTA{ usage, quota }the storage quota is full, even after old clean entries were removed
E_AUTOSAVE_STALLED{ afterMs, step }the listing or a write did not finish in time
E_AUTOSAVE_CONNECTION_LOST{}the database connection is gone and reopening it failed
E_AUTOSAVE_TOO_LARGE{ part }a part of the project could not be built (string length limit)
E_AUTOSAVE_FAILED{ name }any other write failure; name is the error's name
E_AUTOSAVE_ENTRY_TAKEN{ id }an entry another tab holds
E_AUTOSAVE_UNKNOWN_ENTRY{ id }an entry that does not exist
E_AUTOSAVE_FORMAT_NEWER{ formatVersion }an entry written by newer code; left untouched
E_AUTOSAVE_RESTORE_CRASHED{ attempts }an entry whose automatic restore did not finish twice
W_AUTOSAVE_ORIGIN_EPHEMERAL{ persisted, ephemeral, unexported }the browser may delete this site's storage