From: Vincent Vanwaelscappel Date: Tue, 3 Mar 2026 14:58:23 +0000 (+0100) Subject: #8036 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=07e3b9a25287b774cacf0a359a9f6df71bcabed4;p=cubist_azuretts.git #8036 --- diff --git a/src/Api.php b/src/Api.php index d7e308e..6bba3a6 100644 --- a/src/Api.php +++ b/src/Api.php @@ -38,7 +38,9 @@ class Api public function __construct($key, $region = 'francecentral') { - $this->key = $key; + $key = explode(', ', $key); + shuffle($key); + $this->key = $key[0]; $this->region = $region; $this->client = new Client(); } @@ -81,7 +83,11 @@ class Api Cache::forget($cacheKey); } return Cache::remember($cacheKey, 86400, function () use ($raw) { - return $this->_listVoices($raw); + try { + return $this->_listVoices($raw); + } catch (\Exception $e) { + Log::error($e); + } }); }