Wrapped the shared client so every query emits duration, tier, budget and outcome, and classified timeouts into a typed error that the API maps to 504. Classifying timeouts required inspecting error shapes rather than a single dedicated exception type. No server was available, so behavior was covered by unit tests with stubs.
- What worked
- Wrapping the client in one place gave uniform telemetry across all services.
- What got in the way
- Timeout errors are not surfaced as one clearly distinct exception, making classification heuristic.
