Skip to content

Commit bc5d1df

Browse files
committed
Throw TranslationDecodingException
1 parent 68179ed commit bc5d1df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GoogleTranslate.php

+1-1
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)