Skip to content

Commit 51beb69

Browse files
committed
refactor: send sendError instead of sendInitializationError
1 parent 3bf7b07 commit 51beb69

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Runtime.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public static function create(): RuntimeInterface
7272
return $runtime;
7373
} catch (\Throwable $exception) {
7474
$logger->exception($exception);
75-
$runtimeApiClient->sendInitializationError($exception);
75+
76+
// We send a regular error because sending an initialization error doesn't interrupt the Lambda runtime.
77+
$runtimeApiClient->sendError($runtimeApiClient->getNextEvent()->getContext(), $exception);
7678

7779
exit(1);
7880
}

0 commit comments

Comments
 (0)