freakboy3742 / pyxero

Python API for accessing the REST API of the Xero accounting tool.
BSD 3-Clause "New" or "Revised" License
279 stars 209 forks source link

update XeroUnauthorized to handle json response #337

Closed schapman1974 closed 11 months ago

schapman1974 commented 1 year ago

Added json handling to XeroUnauthorized for response on a 401 status that looks like this {"Type":null,"Title":"Unauthorized","Status":401,"Detail":"TokenExpired: token expired at 04/09/2023 05:16:59","Instance":"6489df60-8891-470e-9268-a9a43f5da71e","Extensions":{}} The Exception itself was erroring so it was falling through to a normal Exception