Error catalog
Every typed error class the store throws, harvested from the source at boot - 7 classes, 6 stable codes. Each carries a frozen string
code: catch once with err instanceof StashError and branch on err.code, never on message text.Error classes
| Class | Code | Extends | Description | Declared in |
|---|---|---|---|---|
StashError | Error | Base class for every StashJS error. Carries a stable string code; subclasses fix the code and a capability-free default message. | src/errors.js | |
IntegrityError | EINTEGRITY | StashError | Blob bytes no longer match the recorded digest. Code: EINTEGRITY. | src/errors.js |
InvalidRef | EBADREF | StashError | Malformed ref string; refused before any storage access. Code: EBADREF. | src/errors.js |
RefClaimed | ECLAIMED | StashError | A concurrent pop already claimed the entry. Code: ECLAIMED. | src/errors.js |
RefNotFound | ENOREF | StashError | Unknown or expired ref. Code: ENOREF. | src/errors.js |
SizeExceeded | E2BIG | StashError | maxSize crossed mid-stream. Code: E2BIG. | src/errors.js |
StashFull | EFULL | StashError | maxEntries / maxTotal reached; the push was refused. Code: EFULL. | src/errors.js |
No error message ever contains a ref, a meta value, or a filesystem path - a ref is a capability, and an error that echoes a capability into a log file has leaked it.