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
Errors are currently hard to catch, they’re not strongly typed so I had to let my code throw the error first, then find the name, then add an catch clause to check for that error name
Being able to do instance checking would be much nicer
if isinstance(e, ResourceNameAlreadyExistsError):
...
or at least an enum of error types per namespace:
if e.name == core.Errors.RESOURCE_NAME_ALREADY_EXISTS:
...
or something like:
if isResourceNameAlreadyExistsException(e):
...
The text was updated successfully, but these errors were encountered:
There is ongoing work to improve error handling in both the Python SDK but also the API in general. I'll keep this FR up-to-date when this feature has been released. We'll likely be going with the first option where we subclass PalantirRPCException for each error.
Errors are currently hard to catch, they’re not strongly typed so I had to let my code throw the error first, then find the name, then add an catch clause to check for that error name
Being able to do instance checking would be much nicer
or at least an enum of error types per namespace:
or something like:
The text was updated successfully, but these errors were encountered: