For all API responses different from 2xx, such as Internal Server Error (500), Bad Gateway (502) or Service Temporarily Unavailable (503), a retry logic must be implemented.
Rely on the idempotency tokens functionality to avoid performing the same operation twice.