feat(api): drain telemetry to axiom and return structured errors - #102
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Merge as is — The API error handling and observability wiring are implemented, with runtime delivery unverifiedThe API changes address a real gap: the source now provides structured 404 and 500 responses, logs the request method and path, and the Wrangler configuration references separate log and trace destinations. The diff does not add request-level tests for these new paths, and I could not execute the reported dry-run or verify deployed Axiom delivery; these are non-blocking coverage and verification limitations. Worth noting, not blocking
Merge state: The PR is reported as open and mergeable. Vercel Preview Comments is successful; the other listed checks are null. Approval state and unresolved review threads are unknown. Evidence · 1 verified · 3 not verifiedVerified
Not verified
Both changed files and adjacent API, package, configuration, workflow, and contribution files were read. No command or request was executed, so the reported dry-run, deployed Axiom delivery, and actual route dispatch remain unverified. No prior review threads or ledger findings were supplied.
Comment Review by Rupic. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
modelpedia-api | b5b626a | Commit Preview URL Branch Preview URL |
Aug 31 2026, 04:38 AM |
problem
the worker had observability enabled but no destination, no error handler, and no notFound handler: 5xx and unmatched routes were invisible outside the Cloudflare dashboard and returned Hono's default text bodies while every real route speaks JSON.
change
move the wrangler observability block to the nested logs/traces form with
axiom-logs/axiom-tracesdestinations and invocation logs on, and addapi.onError(structured console.error plus a JSON 500) andapi.notFound(JSON 404) matching the existing{ error: { message, status } }shape.verification
wrangler deploy --dry-runpasses with the new config. after deploy themodelpedia-apiscript name appears in the Axiomcloudflaredataset and route errors carry method and path.