xero-php
xero-php copied to clipboard
Suggested update to an exception message
Hi
Just been porting our system over from the 1.0a oauth private application to an oauth2 standard application and I hit an issue which I have now resolved. I would get a successful connection to the api, so I could request tenant details but if I made a call to request Contacts or Invoices I got
The API returned a non-successful status code that is not recognised.
I actually traced the problem to not having the offline_access scope but that was only after trying things on the Xero previewer and thinking that the only difference between that and mine would be the scopes and investigated further but didnt know if you could extend the above message to actually output the http response code and a text version of what has been received from the Xero API to help others get round this kind of problem, or, if Xero add other responses later that you don't recognise, it might help in identifying what the issue was?
Thanks for a great system tho!
It's probably a start to update the docs to reflect that it's required! If you didn't mind making a PR for this I'd be happy to review and merge it in.