fix(splash): distinguish network errors from auth errors in session check

This commit is contained in:
2026-04-26 05:11:48 +02:00
parent 7c7ffb8f3d
commit 6de01b62ae
2 changed files with 7 additions and 6 deletions

View File

@@ -25,11 +25,7 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
final parsed = UserResponseModel.fromJson(data);
return parsed.item;
} on DioException catch (error) {
final apiMsg = error.response?.data;
final msg = apiMsg is String
? apiMsg
: (error.message ?? 'Error in /auth/me');
throw Exception(msg);
throw mapDioError(error, defaultMessage: 'Error in /auth/me');
}
}