Topic

debugging

3 min read

The URL Was Double-Encoded: Debugging a 400 from %2520

Quick answer: A 400 that only appears when a query value contains a space or a special character is usually double percent-encoding. The client encodes once, then a helper or

Read article
2 min read

The agent appended a duplicate config key, and the last one silently won

The agent needed to raise the request timeout, so it appended a second timeout block to the config instead of editing the existing one. The lenient parser silently kept the last occurrence, and the first tuned value vanished without an error.

Read article
2 min read

The agent added validation after the write instead of before it

The agent added a guard to reject negative quantity, but placed it after the order was already saved. The standalone guard test went green while invalid rows kept landing in the table. A check that runs after the side effect protects nobody.

Read article
2 min read

The agent extracted a shared helper and merged two callers' error paths

Two routes shared an upstream call, so the agent lifted the block into one helper. The callers differed only on fault: one rethrew for a 500, the other served a cached fallback. The helper picked one exit, the harder caller silently degraded, and green tests missed it.

Read article
2 min read

The agent lowercased the lookup key and broke every case-sensitive record

The agent lowercased an opaque external id to fix inconsistent lookups, normalizing on write and read. New rows matched, existing mixed-case rows went missing and fell back to a default nobody noticed. Covers when normalization corrupts stored data and how to keep the canonical token intact.

Read article
2 min read

The agent wired the success path and left the failure branch silent

The agent implemented the happy path, returned 200, and declared done. The failure branch emitted nothing: no log, no trace, no surfaced error, so when it fired in production on-call had nothing to grep for. Covers a structured breadcrumb on every exit branch and verifying it under fault.

Read article