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

PinterestException Codes #17

Closed
smvanbru opened this issue Dec 29, 2015 · 2 comments
Closed

PinterestException Codes #17

smvanbru opened this issue Dec 29, 2015 · 2 comments

Comments

@smvanbru
Copy link

It would be helpful if, when you raised a PinterestException, you set an error code, so our handlers could sort out what sort of error it was in order to handle it appropriately.

Was there an error in the request? If Pinterest responded with an error, what error was it? (perhaps in Request.php, replacing lines 190-193 with this:
// Check the response code
if ( $response->getResponseCode() >= 400 ) {
throw new PinterestException( 'Pinterest error (code: ' . $response->getResponseCode() . ') with message: ' . $response->message, $response->getResponseCode() );
}

Thanks!

dirkgroenen added a commit that referenced this issue Dec 31, 2015
@dirkgroenen
Copy link
Owner

Added in version 0.2.2.

@smvanbru
Copy link
Author

smvanbru commented Jan 5, 2016

Thanks a bunch! This is very helpful.

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

2 participants