-
Notifications
You must be signed in to change notification settings - Fork 75
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
Should have different error for empty response than error response #45
Comments
I assume you're referring to the difference between a if ($response_data === false && !$ch->hasErrors()) {
throw new CurlException("Error: Curl request failed")
}
else if($ch->hasErrors()) {
throw new PinterestException('Error: execute() - cURL error: ' . $ch->getErrors(), $ch->getErrorNumber());
} Let me know if the above is what you mean. |
ya, that should do it. Thanks! |
Cool, I've merged the changes into development. Shall be merged into master somewhere in the next few days. |
Just released a new version which includes this fix. |
At present, in Pinterest/Transport/Request.php, line 211-212, you raise an error for empty response with the same block of code as an error response. With that setup, the empty response is hard to identify in order to be handled appropriately in apps using this library. Would it be possible to adjust this bit to return an identifiable error code for empty responses? Thanks!
The text was updated successfully, but these errors were encountered: