Fatal error: Uncaught Finnhub\ApiException: [0] cURL error 6: Could not resolve host: finnhub.io
Opened this issue · 3 comments
Hello,
I use your api to pull a stock quote every few seconds. I had it all working yesterday and this morning I loaded up my test site and got the error in the title. The code i'm using is this:
require_once('../vendor/autoload.php');
require('functions.php');
$config = Finnhub\Configuration::getDefaultConfiguration()->setApiKey('token', 'my api key');
$client = new Finnhub\Api\DefaultApi(new GuzzleHttp\Client(), $config);
$q = $_REQUEST['q'];
echo formatUSD($client->quote($q)->getc());
The formatUSD is just a little function I made to display it as money. I did also try without that function just to make sure it wasn't causing an error somehow.
The rest of the error references lines 9698 and 9674 in DefaultApi.php.
Thank you!
Edit: removed my api key but it is there in my code
regarding to your error: Could not resolve host: finnhub.io
it could be there is an outage from the server at that time. CC: @finnhubio can you have a look?
Thanks for getting back with me. It is still giving this error several days later. I don't think finnhub is down as I can use their code directly and get a response.
Hi @OnceWasPerfect sorry for late response, let us help a look