fix(splash): distinguish network errors from auth errors in session check
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user