Most LLM API error handling starts out looking like normal HTTP error handling.

If it is a 429, retry later.

If it is a 500, retry with backoff.

If it is a timeout, maybe retry once.

That works fine right up until your first real production incident, where the question is no longer: