next method

void next(
  1. DioException error
)

Deliver the error to the next interceptor.

Typically, the method should be called once interceptors done manipulating the error.

Implementation

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