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

curl errors not exposed #32

Open
samjgarnham opened this issue Jul 24, 2020 · 1 comment
Open

curl errors not exposed #32

samjgarnham opened this issue Jul 24, 2020 · 1 comment

Comments

@samjgarnham
Copy link

Can I suggest after

$result = \curl_exec($curlHandle);

you add:

if (!$result) {
    throw new \Exception(curl_error($curlHandle), curl_errno($curlHandle));
}

This will replace ("An unexpected error occurred processing the web request", 0) with for example ("Could not resolve host: api.esendex.com; Unknown error", 6) which is much more useful.

@yet-another-steve
Copy link

Thank You @samjgarnham . That line exposed for me a CURL error "setting certificate verify locations".

Note for others: add the above to HttpClient.php's request function.

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