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.
1
Request entered the servicePOST /auth/refresh
POST /auth/refresh reached auth-api in iad1.
requestId = req_auth_4b7e19capturedtraceId = 5b9e2d70c4a1f8365e92b07d41c6a8f3captured2
Request entered refresh
token = [REDACTED]redacted3
Session lookup returned no rowSession lookup / postgres.sessions / 0 rows / 9ms /
session = nullcaptured4
Read user_id on a null session
await rotateSession(session.user_id);session
src/auth/refresh.ts:42:27nullcapturedRuntime evidence
Values, bound inputs, I/O records, and throw frame metadata.
Captured locals
session
nullcapturedsession = null / token = [REDACTED] / attempt = 1Origin I/O
Session lookup
postgres.sessions0 rows / 9ms / okBound inputs
headers.x-request-id = "req_auth_4b7e19"Capture completenesscaptured locals / captured args / captured I/O23 KB package / encrypted yes
Trace path
POST /auth/refreshSession lookup: 0 rowssession = nullsrc/auth/refresh.ts:42request / I/O / local / stackStack 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:27
await 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
ok9ms0 rows
postgres.sessionsCapture completeness
QualitycompleteLocalscapturedArgscapturedI/OcapturedEncryptedyesPayload23 KB
policy appliedpayload 23 KB