Generated code is written for the happy path. The network call answers, the database is up, the payment succeeds. Mishandling of exceptional conditions is now its own entry, A10, in the OWASP Top 10:2025.
Every call over the network needs a timeout. The Requests library for Python says it plainly: by default, requests do not time out unless a timeout is set, and without one your code may hang for minutes or more.
Retries need a limit and a growing wait. A loop that retries at once, forever, turns one failing service into a flood of requests; capped retries with exponential backoff and jitter are the standard pattern (AWS Architecture Blog).
An error that is caught and ignored is worse than one that crashes: nothing is logged, nothing retries, and the caller is told everything is fine. Catch only what you can handle, log the rest, and never report success you did not have. Webhooks also need their signature checked, or anyone can send you "payment succeeded".