DeepLcom / deepl-php

Official PHP library for the DeepL language translation API.
MIT License
202 stars 23 forks source link

Connection timed out error when calling getUsage #10

Open KaracsonyMarton opened 1 year ago

KaracsonyMarton commented 1 year ago

$usage = $translator->getUsage();

DeepL\ConnectionException: Operation timed out after 10001 milliseconds with 0 bytes received in /var/www/vendor/deeplcom/deepl-php/src/HttpClient.php:200

daniel-jones-deepl commented 1 year ago

HI @KaracsonyMarton, thanks for reporting the issue.

Does this problem occur continually? It could be just a temporary condition.

KaracsonyMarton commented 1 year ago

Yes, before each translation, we make a call to the translate API endpoint only if we are sure we have enough credits.