retryOnServerErrors

fun retryOnServerErrors(maxRetries: Int = -1)

Enables retrying a request if a 5xx response is received from a server and specifies the number of retries.