Blog

Debugging

401 vs 403 in your API logs: illustrative log lines showing a burst of 401s on POST /login from one IP ending in a 200, then 403s on sequential invoice IDs
Debugging

401 vs 403 in your Node API logs: what each pattern means

401 and 403 look alike in a log but answer different questions. What each means under RFC 9110, four auth patterns worth an alert, how to return the right one in Express and Fastify, and five searches to run on last week's logs.

Jason Fill November 8, 2026 4 min read
Header: 'Webhooks that fail one time in ten.' beside an illustrative webhook log: a 401 signature mismatch on an amount of 24.50, the same event handled twice after a slow 4.1 s response and a retry, and a fast queued 200.
Debugging

Debugging webhooks in Node: failed signatures, retries and duplicate events

Webhook bugs rarely reproduce on your laptop: a signature check that fails one time in ten, the same event processed twice, a retry storm after a slow deploy. Here's the fix for each, plus how to get the exact request in front of you.

Jason Fill November 5, 2026 6 min read
Header: 'Your API isn't slow. It's waiting for a connection.' beside an illustrative terminal showing a pg pool with 10 total, 0 idle and waiting climbing from 47 to 240, and GET /v1/dashboard at p95 9.8s with 80 ms of database time.
Debugging

Your Node API isn't slow. It's waiting for a database connection.

Fine in testing, then 200 people open the same page and the endpoint takes ten seconds. CPU is flat and Postgres says every query is fast. That's pool starvation. Here's why it happens in Node, how to spot it, the fixes with code, and how to prove they worked.

Jason Fill November 3, 2026 6 min read
ECONNRESET, ETIMEDOUT, ECONNREFUSED: headline 'Three error codes, three different parties that hung up' with each code, its syscall and meaning, and the note that a stale keep-alive socket is the usual ECONNRESET cause in an API.
Debugging

ECONNRESET, ETIMEDOUT, ECONNREFUSED: what each means in your Node logs

ECONNREFUSED, ETIMEDOUT and ECONNRESET look alike in a log and have different causes. What each one means, how to tell inbound from outbound, and the fixes: keep-alive timeouts, explicit timeouts, and retries only on idempotent calls.

Jason Fill September 28, 2026 4 min read
Header: 'Your MCP server is an API. Debug it like one.' beside an illustrative log of MCP calls returning 200, 404 (session not found), 401 (token expired) and 499 (client gave up).
Debugging

Your MCP server is an API. Debug it like one.

A remote MCP server works on localhost, then fails in production with a vague "tool call failed." Lost sessions behind a load balancer, expiring OAuth tokens and proxies that cut streams off are all visible at the HTTP layer. Here's where to look.

Jason Fill August 12, 2026 8 min read
Express error handling in production: an Express error middleware with a res.headersSent check next to two JSON log lines, a 500 error with requestId and route GET /orders/:id and a 409 warning (illustrative)
Debugging

Express error handling in production: async errors, error middleware and what to log

An async handler that rejects in Express 4 can crash the process or leave the request hanging. How errors reach your error middleware in Express 4 and 5, one error class for status codes, and what to log so on-call can find the request behind a 500.

Jason Fill May 14, 2026 7 min read