onError method

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

The callback will be executed on error.

Implementation

@override
FutureOr<dynamic> onError(
  DioException err,
  ErrorInterceptorHandler handler,
) {
  loggy.error('\nERROR:\n$err');

  handler.next(err);
}