We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4cb6e2 commit 1fc7644Copy full SHA for 1fc7644
1 file changed
src/GoogleTranslate.php
@@ -308,7 +308,7 @@ public function getResponse(string $string): array
308
'query' => $queryUrl,
309
] + $this->options);
310
} catch (RequestException $e) {
311
- throw new ErrorException($e->getMessage());
+ throw new ErrorException($e->getMessage(), $e->getCode());
312
}
313
314
$body = $response->getBody(); // Get response body
0 commit comments