Skip to content

Commit

Permalink
Throw TranslationRequestException
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Nov 29, 2022
1 parent 4af1ee0 commit 6f6e57f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GoogleTranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function getResponse(string $string): array
'query' => $queryUrl,
] + $this->options);
} catch (Throwable $e) {
throw new ErrorException($e->getMessage(), $e->getCode());
throw new TranslationRequestException($e->getMessage(), $e->getCode());
}

$body = $response->getBody(); // Get response body
Expand Down

0 comments on commit 6f6e57f

Please sign in to comment.