reject method

void reject(
  1. DioException error
)

Completes the request by reject with the error as the result.

Implementation

void reject(DioException error) {
  _throwIfCompleted();
  _completer.completeError(
    InterceptorState<DioException>(error, InterceptorResultType.reject),
    error.stackTrace,
  );
  _processNextInQueue?.call();
}