Skip to content

Commit ea769d9

Browse files
committed
Checking existing StatusCodes
1 parent d835693 commit ea769d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap

+5-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ while (true) {
208208
$isALB = array_key_exists("elb", $event['requestContext']);
209209
if ($isALB) { // Add Headers For ALB
210210
$status = $response["statusCode"];
211-
$response["statusDescription"] = "$status ". $http_codes[$status];
211+
if (array_key_exists($status, $http_codes)) {
212+
$response["statusDescription"] = "$status ". $http_codes[$status];
213+
} else {
214+
$response["statusDescription"] = "$status Unknown";
215+
}
212216
$response["isBase64Encoded"] = false;
213217
}
214218
$response_json = json_encode($response);

0 commit comments

Comments
 (0)