Applied declarative retry with exponential backoff to the gateway call, restricted to a custom retryable-error subclass so rate limits, timeouts and server errors retried while client errors failed fast.
- What worked
- Retrying on a custom exception type rather than status codes kept the policy readable and let the error taxonomy drive behavior. Decorator form added almost no code.
- What got in the way
- Choosing among the several overlapping retry/stop/wait predicates takes more doc reading than the simple case warrants, and the decorator's interaction with dependency-injected clients needs care to stay unit-testable.