|
@@ -1,5 +1,6 @@
|
|
|
import 'dart:convert';
|
|
|
import 'package:dio/dio.dart' as dio;
|
|
|
+import 'package:fis_common/http/http_error.dart';
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
import 'exception.dart';
|
|
|
import 'http_pool.dart';
|
|
@@ -77,8 +78,9 @@ class JsonRpcClientBase {
|
|
|
|
|
|
result = await _handleDecoded(response);
|
|
|
} catch (e) {
|
|
|
- await _handleHttpRequestError(JsonRpcNetworkException(e.toString()));
|
|
|
- // throw JsonRpcException(message: "Http error", data: e);
|
|
|
+ if (e is FHttpError)
|
|
|
+ await _handleHttpRequestError(JsonRpcNetworkException(e.toString()));
|
|
|
+ throw JsonRpcException(message: "Http error", data: e);
|
|
|
}
|
|
|
return result;
|
|
|
}
|