capture
Runtime evidence
Capture permitted local values and execution-specific context at the throw, not a summary written after the fact.
1import { init } from "errorcore";23init({4 service: "auth-api",5 deploymentEnv: process.env.ERRORCORE_ENVIRONMENT,6 transport: { type: "http", url: process.env.ERRORCORE_INGEST_URL,7 apiKey: process.env.ERRORCORE_API_KEY },8 encryptionKey: process.env.ERRORCORE_DEK,9});1011const session = await db.queryOne(12 "select user_id from sessions where token = ?", [token]);13await rotateSession(session.user_id);
Local state at the throw, the request and trace context, and the ordered database, cache, queue, and HTTP work that preceded it.
Sensitive fields scrubbed, payload encrypted inside your process.
Logs and traces record that a request failed and roughly where it went. They rarely keep the values the failing frame was holding, or the exact order of work that produced them.
Errorcore is the layer underneath: it captures selected execution-specific evidence at the throw and keeps it with the incident, so an investigation starts from what actually ran.
Nothing below is a summary of the error. Each stop is a record the console renders for the occurrence you are reading, in the order the SDK captured it.
Throw site
The failing expression is kept with the file and line, and the value that mattered is flagged inline instead of being reconstructed from a message.
auth-api · line 16
await rotateSession(session.user_id);sessionnullthe local that mattered
Local state
Locals and bound arguments are recorded as they stood at the throw. A value is captured, redacted, truncated, missing, or derived, and it renders exactly as it was stored.
nullcaptured[redacted]redacted{ "rotate": true, …truncatedRequest and trace
Method, route, status, and request identifier sit beside the trace and span context, so a failure in one service can be read against the others that share its trace.
POST /v1/session/rotate5009f2c4e18a7b34d0e91c5…b34d0e91c5a7f210Ordered I/O
Database, cache, queue, DNS, and HTTP operations keep their sequence, duration, and outcome. The operation that produced the failing value is tied back to the throw.
The zero-row read is what left session null.
Grouped incident
Identical failures group under a single incident with a status you can move through open, watching, and resolved. Every occurrence keeps the capture it arrived with.
TypeError: cannot read 'user_id' of null
capture
Capture permitted local values and execution-specific context at the throw, not a summary written after the fact.
order
Show database, cache, queue, DNS, and HTTP work in the sequence preceding the failure, with durations and outcomes.
delivery
Scrub configured fields and encrypt the payload inside the application process, before anything leaves it.
The SDK scrubs configured fields and encrypts the package inside your process, so the ingest boundary receives an encrypted envelope rather than an open error dump.
What survived and what did not stays visible for the whole investigation, and delivery is just as explicit: each event carries an admission outcome with a stated reason.
Next step
Public beta · evaluation only · use non-sensitive test data · security model