shotgunsoftware / python-api

A Python-based library for accessing Flow Production Tracking API.
https://developer.shotgridsoftware.com/python-api
Other
308 stars 198 forks source link

Could we get Error Code in Shotgun's Exception #247

Open francoisgfx opened 3 years ago

francoisgfx commented 3 years ago

Could you add the http return/error code in the Shotgun's Exception ? I would like to manage some exception based on 4xx and 5xx exceptions.

for instance, here I'll loose all error code : https://github.com/shotgunsoftware/python-api/blob/master/shotgun_api3/shotgun.py#L2689

same issue here https://github.com/shotgunsoftware/python-api/blob/master/shotgun_api3/shotgun.py#L4121

but it seems _call_rpc is fine since you only do a raise at the end