You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This SDK supports producing metrics that can be consumed as part of an [OpenTelemetry](https://opentelemetry.io/) setup. For more information, please see [the documentation](https://github.com/openfga/python-sdk/blob/main/docs/opentelemetry.md)
1409
1437
1410
-
### Error Handling
1411
-
1412
-
The SDK provides comprehensive error handling with detailed error information and convenient helper methods.
1413
-
1414
-
Key features:
1415
-
- Operation context in error messages (e.g., `[write]`, `[check]`)
1416
-
- Detailed error codes and messages from the API
1417
-
- Helper methods for error categorization (`is_validation_error()`, `is_retryable()`, etc.)
1418
-
1419
-
```python
1420
-
from openfga_sdk.exceptions import ApiException
1421
-
1422
-
try:
1423
-
await client.write([tuple])
1424
-
except ApiException as e:
1425
-
print(f"Error: {e}") # [write] HTTP 400 type 'invalid_type' not found (validation_error) [request-id: abc-123]
0 commit comments