Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors coming back from API are not passed on by Request::__call() #38

Open
DavidAnderson684 opened this issue Dec 16, 2020 · 0 comments

Comments

@DavidAnderson684
Copy link

Using this PHP SDK, I had a customer who was getting back an HTTP 403. That's all the information that could be learned by catching the RuntimeException.

But tinkering inside Request::__call(), I was able to discover that PrintNode was also sending back a useful body:

string(202) "{
  "code": "Forbidden",
  "message": "Your VAT information is inconsistent or incomplete.  Please log in to your account control panel and fix this",
  "uid": "42..."
}

It would be good if that information was obtainable by the consumer, rather than dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant