errorcore
errorcore.init()
ready
1import errorcore from "errorcore";
2
3errorcore.init({ service: "auth-api", captureIO: true });
4
5const session = await db.queryOne(
6 "select user_id from sessions where token = ?",
7 [token]
8);
9
10await rotateSession(session.user_id);

Capture failures with the state that explains them.

errorcore records the throw boundary, request flow, and sensitive-path guards so production exceptions arrive with enough context to debug quickly and safely.

Open documentationView on GitHub

Capture the state behind each error.

errorcore records local variables, bound arguments, and in-flight values at the point an error is thrown. This shows the state that led to the failure.

IO in order

Every outbound query, HTTP call, and DNS lookup is recorded in sequence. You can follow the execution path leading up to the error.

Encrypted in-process

Incident payloads are encrypted before leaving the process. The collector only receives ciphertext. Keys remain with the service.

Scrubbing

Define what gets removed.

Headers, environment variables, and request fields can be specified. All other data is retained for debugging.

Delivery

Dead-letter by default.

If delivery fails, payloads are stored locally and retried when connectivity returns.

Footprint

Focused on failure context.

No tracing layer. No metrics pipeline. No unnecessary dependencies.