@@ -67,7 +67,7 @@ class ApiHelper {
6767 break ;
6868 }
6969 return response;
70- } on DioError catch (error) {
70+ } on DioException catch (error) {
7171 if (error.response? .statusCode == 401 ) {
7272 return remoteApi.handleUnauthorizedError (error, data, queryParams);
7373 }
@@ -149,7 +149,7 @@ class RemoteApi {
149149
150150 handler.next (response);
151151 },
152- onError: (DioError error, ErrorInterceptorHandler handler) async {
152+ onError: (DioException error, ErrorInterceptorHandler handler) async {
153153 handler.next (error);
154154 },
155155 ));
@@ -170,7 +170,7 @@ class RemoteApi {
170170 /// Handles an unauthorized error by refreshing the JWT and making the request again.
171171 ///
172172 /// Returns the [Response] object or null if navigation to the login screen occurs.
173- Future <Response ?> handleUnauthorizedError (DioError error,
173+ Future <Response ?> handleUnauthorizedError (DioException error,
174174 Map <String , dynamic >? data, Map <String , dynamic >? queryParams) async {
175175 try {
176176 String ? jwt = await UserApi .refreshToken ();
@@ -188,10 +188,10 @@ class RemoteApi {
188188 responseType: error.requestOptions.responseType,
189189 ),
190190 );
191- } on DioError catch (_) {
191+ } on DioException catch (_) {
192192 navigatorKey.currentState? .pushReplacementNamed ('/login' );
193193 }
194- } on DioError {
194+ } on DioException {
195195 navigatorKey.currentState? .pushReplacementNamed ('/login' );
196196 }
197197 return null ;
0 commit comments