APIs & Integrations

fernandomineiro
Member

Why give this error?

Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 6: Couldn't resolve host 'api.hubapi.com' (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185 Stack trace: #0 /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(181): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(110): G in /opt/lampp/htdocs/opa/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 185

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Why give this error?

Hey @fernandomineiro,

 

I hope all is well with you 🙂

 

Digging into this error, it looks like this is a DNS issue where api.hubapi.com cannot be resolved to an IP address in your environment and I note that people resolved this by adding the hostname in Ubuntu /etc/hosts file. Referencing these discussion here:

Could you try this and see if it works out for you?

 

Also, do you mind sharing with me where and how are you seeing these errors? What's the endpoint here that you're using?