From 4e4a03be38eccaa16b70c850c790cdc1ea1bb6e9 Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:59:12 +0700 Subject: [PATCH] fix: cast cache string response to JSON object --- src/aws.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aws.ts b/src/aws.ts index 16a0293..ff1cdd5 100644 --- a/src/aws.ts +++ b/src/aws.ts @@ -52,7 +52,7 @@ export async function get(key: string) { return false; } - return await response.Body.transformToString(); + return JSON.parse(await response.Body.transformToString()); } catch (e: any) { if (e['$metadata']?.httpStatusCode !== 404) { capture(e, { key, path: path(key) });