@@ -65,7 +65,7 @@ class HttpRequest {
65
65
queryParameters: queryParameters,
66
66
data: data,
67
67
);
68
- } on DioError catch (e) {
68
+ } on DioException catch (e) {
69
69
return _throwException (e);
70
70
}
71
71
}
@@ -86,7 +86,7 @@ class HttpRequest {
86
86
contentType: contentType,
87
87
),
88
88
);
89
- } on DioError catch (e) {
89
+ } on DioException catch (e) {
90
90
return _throwException (e);
91
91
}
92
92
}
@@ -107,7 +107,7 @@ class HttpRequest {
107
107
contentType: contentType,
108
108
),
109
109
);
110
- } on DioError catch (e) {
110
+ } on DioException catch (e) {
111
111
return _throwException (e);
112
112
}
113
113
}
@@ -128,7 +128,7 @@ class HttpRequest {
128
128
contentType: contentType,
129
129
),
130
130
);
131
- } on DioError catch (e) {
131
+ } on DioException catch (e) {
132
132
return _throwException (e);
133
133
}
134
134
}
@@ -145,14 +145,14 @@ class HttpRequest {
145
145
data: data,
146
146
queryParameters: queryParameters,
147
147
);
148
- } on DioError catch (e) {
148
+ } on DioException catch (e) {
149
149
return _throwException (e);
150
150
}
151
151
}
152
152
153
- Never _throwException (DioError e) {
153
+ Never _throwException (DioException e) {
154
154
final message = e.message ?? '' ;
155
- if (e.type == DioErrorType .badResponse) {
155
+ if (e.type == DioExceptionType .badResponse) {
156
156
throw MeiliSearchApiException .fromHttpBody (message, e.response? .data);
157
157
} else {
158
158
throw CommunicationException (message);
0 commit comments