You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -270,14 +268,11 @@ public function failInitialization(string $message, ?\Throwable $error = null):
270
268
exit(1);
271
269
}
272
270
273
-
/**
274
-
* @param mixed $data
275
-
*/
276
271
privatefunctionpostJson(string$url, $data): void
277
272
{
278
273
$jsonData = json_encode($data);
279
274
if (false === $jsonData) {
280
-
thrownewException(sprintf("The Lambda response cannot be encoded to JSON.\nThis error usually happens when you try to return binary content. If you are writing an HTTP application and you want to return a binary HTTP response (like an image, a PDF, etc.), please read this guide: https://bref.sh/docs/runtimes/http.html#binary-responses\nHere is the original JSON error: '%s'", json_last_error_msg()));
275
+
thrownew\Exception(sprintf("The Lambda response cannot be encoded to JSON.\nThis error usually happens when you try to return binary content. If you are writing an HTTP application and you want to return a binary HTTP response (like an image, a PDF, etc.), please read this guide: https://bref.sh/docs/runtimes/http.html#binary-responses\nHere is the original JSON error: '%s'", json_last_error_msg()));
281
276
}
282
277
283
278
if (null === $this->returnHandler) {
@@ -297,7 +292,7 @@ private function postJson(string $url, $data): void
297
292
if (curl_errno($this->returnHandler) > 0) {
298
293
$errorMessage = curl_error($this->returnHandler);
299
294
$this->closeReturnHandler();
300
-
thrownewException('Error while calling the Lambda runtime API: '.$errorMessage);
295
+
thrownew\Exception('Error while calling the Lambda runtime API: '.$errorMessage);
0 commit comments