onError method

  1. @override
Future onError(
  1. DioException err,
  2. ErrorInterceptorHandler handler
)
override

Called when an exception was occurred during the request.

Implementation

@override
Future onError(DioException err, ErrorInterceptorHandler handler) async {
  print('ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}');
  super.onError(err, handler);
}