mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
refactor(linter): Change DioError to DioException
This commit is contained in:
parent
2f6b4e0f9c
commit
02a2097b10
|
@ -103,7 +103,7 @@ class BackblazeApi extends RestApiMap {
|
|||
} else {
|
||||
throw Exception('code: ${response.statusCode}');
|
||||
}
|
||||
} on DioError catch (e) {
|
||||
} on DioException catch (e) {
|
||||
print(e);
|
||||
return GenericResult(
|
||||
data: false,
|
||||
|
|
|
@ -144,7 +144,7 @@ class CloudflareApi extends RestApiMap {
|
|||
);
|
||||
}
|
||||
await Future.wait(allCreateFutures);
|
||||
} on DioError catch (e) {
|
||||
} on DioException catch (e) {
|
||||
print(e.message);
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
|
|
|
@ -133,7 +133,7 @@ class DigitalOceanDnsApi extends RestApiMap {
|
|||
);
|
||||
}
|
||||
await Future.wait(allCreateFutures);
|
||||
} on DioError catch (e) {
|
||||
} on DioException catch (e) {
|
||||
print(e.message);
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
|
|
|
@ -25,7 +25,7 @@ abstract class RestApiMap {
|
|||
|
||||
dio.interceptors.add(
|
||||
InterceptorsWrapper(
|
||||
onError: (final DioError e, final ErrorInterceptorHandler handler) {
|
||||
onError: (final DioException e, final ErrorInterceptorHandler handler) {
|
||||
print(e.requestOptions.path);
|
||||
print(e.requestOptions.data);
|
||||
|
||||
|
@ -96,7 +96,7 @@ class ConsoleInterceptor extends InterceptorsWrapper {
|
|||
|
||||
@override
|
||||
Future<void> onError(
|
||||
final DioError err,
|
||||
final DioException err,
|
||||
final ErrorInterceptorHandler handler,
|
||||
) async {
|
||||
final Response? response = err.response;
|
||||
|
|
|
@ -87,7 +87,7 @@ class HetznerApi extends RestApiMap {
|
|||
final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false';
|
||||
Response? serverCreateResponse;
|
||||
HetznerServerInfo? serverInfo;
|
||||
DioError? hetznerError;
|
||||
DioException? hetznerError;
|
||||
bool success = false;
|
||||
|
||||
final Dio client = await getClient();
|
||||
|
@ -117,7 +117,7 @@ class HetznerApi extends RestApiMap {
|
|||
serverCreateResponse.data['server'],
|
||||
);
|
||||
success = true;
|
||||
} on DioError catch (e) {
|
||||
} on DioException catch (e) {
|
||||
print(e);
|
||||
hetznerError = e;
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue