JL
EN
Docs Home
Menu
Guides

Troubleshooting Common Failures

Diagnose common jsonlog request failures and apply direct fixes.

guide jsonlog

Troubleshooting Common Failures

Purpose: provide strict symptom-to-cause-to-fix guidance for common integration failures.

Failure Matrix

SymptomLikely CauseFix
POST /query returns 401 (Missing bearer token)Authorization header missingSend Authorization: Bearer <token> from auth bootstrap flow
POST /query returns 401 (Invalid token)Expired/invalid JWT or wrong issuer/audienceRe-bootstrap token and confirm auth config (AUTH_ISSUER, AUTH_AUDIENCE, JWKS URL)
POST /query returns 400 (start_ts must be <= end_ts)Invalid time range in request bodyEnsure start_ts is less than or equal to end_ts
POST /log returns 400/validation errorRequest body is not valid JSON objectAlways send JSON body (minimum {})
Private channel write returns 401No token supplied for owner-protected channelSend valid owner Bearer token
Private channel read/write returns 404Account mismatch with channel ownerUse token with matching JWT acc claim
WebSocket private upgrade returns 401Missing/invalid token in upgrade requestInclude valid Authorization header during upgrade
WebSocket private upgrade returns 404Token acc does not match channel ownerReconnect with owner-account token
POST /query returns empty filesNo uploaded files in range or filters too narrowExpand range/filter values and verify uploader/compression workers are running
/query endpoints missing from OpenAPIDatabase integration disabledSet DATABASE_URL and restart service to enable query routes

Quick Diagnostics

JSONLOG_BASE_URL="http://localhost:3002"

curl -sS "${JSONLOG_BASE_URL}/health"
curl -sS "${JSONLOG_BASE_URL}/stats"
curl -sS "${JSONLOG_BASE_URL}/openapi.json" | jq '.paths | keys'

Scripted Auth Troubleshooting

cd jsonlog
set -a && source .env && set +a
npm run test:auth:smoke

This smoke flow validates missing-auth, invalid-auth, and valid-auth behavior for /query.