shouldRetry

fun shouldRetry(customRetryForStatusCodes: Map<Int, Boolean>?, retryAllowed: Boolean): Boolean

Checks if the request should be retried. Requests will not be retried if:

  • the request was successful (status code 2xx)

  • the request is larger than the configured maximum byte size

  • the status code is in the list of configured no-retry codes

  • the status code is in the list of default no-retry codes - 400, 401, 403, 410, or 422

See also