Errors
Every failure StashJS reports is a typed error with a stable
.code. Consumers branch on the code, never on the message text: messages are free to improve between patches, codes are frozen. All classes extend StashError, so err instanceof StashError separates a stash verdict from an unrelated bug.
No message ever contains a ref, a meta value, or a filesystem path (the CWE-209 / CWE-532 exposure classes). A ref is a capability, and an error that echoes one into a log file has leaked it.
Every class and its stable code is cataloged on the Error catalog reference page, harvested from the source at boot.