Back off and retry on 429 and 5xx errors without hammering the API.
Made for you now: slide lessons from basics to production, usually with code and a quiz. See a finished one