Auto-retry for API calls
Many functions automatically retry failed API calls before giving up:
- The HTTP functions
- The REST functions
- The Xurrent REST API functions
- The Xurrent Graphql API functions
This is useful for transient network errors, rate limiting, and so on.
Auto-retry works for Xurrent and Microsoft Graph accounts, and for all HTTP accounts that are configured with one of the following authentication types:
- Bearer token
- OAuth 2.0 client credentials
- OAuth 2.0 password
- Custom header
- Custom URL parameter
Retrying is done according to the following rules:
- Rate limit
When theretry-afterheader is present in the response, retry after the specified delay. - GraphQL cost limit
When the response indicates that the query cost exceeds the remaining budget, retry after the delay specified in the response body. - Connection error
Retry based on error type:ETIMEDOUT(1 retry)ECONNREFUSED/ECONNRESET/ENOTFOUND(5 retries)- Other (10 retries)
- 4xx or 5xx response code
Most status codes are retried up to 2 times. The following status codes are not retried:- 400
- 401
- 404
- 422
- 505