You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
406 B
14 lines
406 B
import 'package:core/services/error.reporter.service.dart';
|
|
import 'package:dio/dio.dart';
|
|
|
|
class ExceptionInterceptor extends Interceptor {
|
|
ExceptionInterceptor(this._errorReporterService);
|
|
|
|
final ErrorReporterService _errorReporterService;
|
|
|
|
@override
|
|
void onError(DioException err, ErrorInterceptorHandler handler) {
|
|
_errorReporterService.reportError(err);
|
|
return handler.next(err);
|
|
}
|
|
}
|