onErrorInterceptor function

void onErrorInterceptor(
  1. DioException e,
  2. ErrorInterceptorHandler handler
)

Implementation

void onErrorInterceptor(DioException e, ErrorInterceptorHandler handler) {
  handler.next(e); // 使用handler.next传递错误
}