Skip to content

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

@DavidAnderson684

Description

@DavidAnderson684

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions