From 68324daf7852343d895e415062f5ad659b511bee Mon Sep 17 00:00:00 2001 From: Vladimir Vlach Date: Fri, 20 Oct 2023 07:27:36 +0200 Subject: [PATCH] String response for lambda function - no need to strinfigy string (#6208) --- packages/bun-lambda/runtime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bun-lambda/runtime.ts b/packages/bun-lambda/runtime.ts index ab03376f5b..3f567ec17b 100755 --- a/packages/bun-lambda/runtime.ts +++ b/packages/bun-lambda/runtime.ts @@ -279,7 +279,7 @@ async function sendResponse(response: unknown): Promise { } await fetch(`runtime/invocation/${requestId}/response`, { method: "POST", - body: response === null ? null : JSON.stringify(response), + body: response === null ? null : (typeof response === 'string' ? response : JSON.stringify(response)), }); }