refactor(linter): Change DioError to DioException

pull/411/head
NaiJi ✨ 2023-12-20 16:50:43 +04:00
parent 2f6b4e0f9c
commit 02a2097b10
5 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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) {