Skip to content

Commit

Permalink
Throw TranslationDecodingException
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Nov 29, 2022
1 parent 68179ed commit bc5d1df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GoogleTranslate.php
Expand Up @@ -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;
Expand Down

0 comments on commit bc5d1df

Please sign in to comment.