diff --git a/src/GoogleTranslate.php b/src/GoogleTranslate.php index 63455f1..1fe4250 100644 --- a/src/GoogleTranslate.php +++ b/src/GoogleTranslate.php @@ -333,7 +333,7 @@ public function getResponse(string $string): array try { $bodyArray = json_decode($bodyJson, true, flags: JSON_THROW_ON_ERROR); } catch (JsonException) { - throw new UnexpectedValueException('Data cannot be decoded or it is deeper than the recursion limit'); + throw new TranslationDecodingException('Data cannot be decoded or it is deeper than the recursion limit'); } return $bodyArray;