canRetry static method

bool canRetry(
  1. DioException error
)

Whether error is retryable and has a request-local attempt remaining.

Implementation

static bool canRetry(DioException error) {
  final options = error.requestOptions;
  final retryCount = _nonNegativeInt(options.extra[retryCountKey]);
  return retryCount < _resolveMaximumRetries(options) &&
      _isRetryableTransportFailure(error);
}