sitegeist / Sitegeist.LostInTranslation

Automatic Translations for Neos via DeeplApi
GNU General Public License v3.0
9 stars 9 forks source link

BUGFIX: Retry three times and eventually return non-translated texts #23

Closed gradinarufelix closed 1 year ago

gradinarufelix commented 1 year ago

We sometimes get the following error, but cannot really isolate it.

Neos_Flow_Http_Client_Browser.php: cURL reported error code 35 with message "OpenSSL SSL_connect: Connection reset by peer in connection to [api.deepl.com:443](http://api.deepl.com:443/) ". Last requested URL was "https://api.deepl.com/v2/translate" (POST)

It seems like sometimes, there are fluctuations in the network. Thus, I would try introducing a retry-routing in the DeepL API and return the untranslated texts if there is an error.

What do you think about it? Is this useful or more bothering? Do you have a different idea how to deal with this error? And should we return untranslated texts or just fail if all retries fail?