onError method
Called when an exception was occurred during the request.
Implementation
@override
Future onError(DioException err, ErrorInterceptorHandler handler) async {
//请求错误也需要处理清除缓存和Loading的逻辑
handleEndWithRequestOption(err.requestOptions);
super.onError(err, handler);
}