Skip to content

Commit 9ab9aaa

Browse files
committed
fix: Restore parsed_exception access for backward compatibility
Reverted breaking change - parsed_exception is now accessible again. This makes the changes purely additive with zero breaking changes. What works (backward compatible): - e.parsed_exception.code - Still works! - e.parsed_exception.message - Still works! - e.header.get('fga-request-id') - Still works! What's new (additive): - e.code - Convenience property - e.error_message - Convenience property - e.request_id - Convenience property - e.store_id - Convenience property - e.authorization_model_id - Convenience property - e.operation_name - Auto-extracted from telemetry - e.is_validation_error() - Helper method - e.is_retryable() - Helper method - etc. Tests: 21 unit tests passing
1 parent 8a87135 commit 9ab9aaa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

openfga_sdk/exceptions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ def __str__(self):
172172

173173
@property
174174
def parsed_exception(self):
175-
raise AttributeError(
176-
"parsed_exception is not directly accessible. "
177-
"Use e.code, e.error_message, e.request_id instead."
178-
)
175+
return self._parsed_exception
179176

180177
@parsed_exception.setter
181178
def parsed_exception(self, content):

0 commit comments

Comments
 (0)