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.
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.
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.
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.
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.
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.