Skip to content

Commit bc5d1df

Browse files
committed
Throw TranslationDecodingException
1 parent 68179ed commit bc5d1df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/GoogleTranslate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public function getResponse(string $string): array
333333
try {
334334
$bodyArray = json_decode($bodyJson, true, flags: JSON_THROW_ON_ERROR);
335335
} catch (JsonException) {
336-
throw new UnexpectedValueException('Data cannot be decoded or it is deeper than the recursion limit');
336+
throw new TranslationDecodingException('Data cannot be decoded or it is deeper than the recursion limit');
337337
}
338338

339339
return $bodyArray;

0 commit comments

Comments
 (0)