Error Context Layer / auth-api / production / inc_4b7e19

error

Null session at token rotation

TypeError Cannot read properties of null (reading 'user_id')

Status
open
Priority
P1
Events
96
Capture
complete

Context Timeline

Request entry, outbound I/O, local state records, and the throw frame.

request -> I/O -> local state -> throw
1
Request entered the service

POST /auth/refresh reached auth-api in iad1.

requestId = req_auth_4b7e19capturedtraceId = 5b9e2d70c4a1f8365e92b07d41c6a8f3captured
POST /auth/refresh
2
Request entered refresh
token = [REDACTED]redacted
3
Session lookup returned no row
session = nullcaptured
Session lookup / postgres.sessions / 0 rows / 9ms /
4
Read user_id on a null session
await rotateSession(session.user_id);
sessionnullcaptured
src/auth/refresh.ts:42:27

Runtime evidence

Values, bound inputs, I/O records, and throw frame metadata.

complete
Captured locals
sessionnullcaptured
session = null / token = [REDACTED] / attempt = 1
Origin I/O
Session lookuppostgres.sessions0 rows / 9ms / ok
Bound inputsheaders.x-request-id = "req_auth_4b7e19"
Capture completenesscaptured locals / captured args / captured I/O23 KB package / encrypted yes
Trace pathPOST /auth/refreshSession lookup: 0 rowssession = nullsrc/auth/refresh.ts:42request / I/O / local / stack

Stack trace entry point

The stack identifies where Errorcore attached the context above; it is the entry point, not the full answer.

refreshSessionsrc/auth/refresh.ts:42:27await rotateSession(session.user_id);
refreshRoutesrc/routes/auth.ts:73:14

Request context

LinePOST /auth/refreshRequest IDreq_auth_4b7e19Status500Regioniad1RoutePOST /auth/refreshBodytoken fields redactedTrace5b9e2d70c4a1f8365e92b07d41c6a8f3Spanc81d4f5a92e3607b

Runtime and I/O

Nodev22.14.0Hostiad-auth-01Release2026.05.08-4f17c2SDK0.9.1Memoryrss 384 MB, heap 121 MBLoop lag17 ms
Session lookup

0 rows

postgres.sessions
ok9ms

Capture completeness

QualitycompleteLocalscapturedArgscapturedI/OcapturedEncryptedyesPayload23 KB
policy appliedpayload 23 KB