From 2000ca9b55d2cc58b7da05b92e17a17f36bf23e4 Mon Sep 17 00:00:00 2001 From: Lalit Mohan Kalpasi Date: Thu, 19 Jun 2025 07:03:30 +0000 Subject: [PATCH] code update recorded at: 19/06/25 07:03:30 --- handler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handler.js b/handler.js index 94470c7..71ad8b2 100644 --- a/handler.js +++ b/handler.js @@ -61,6 +61,7 @@ export function preRequestHandler() { setHeader('x-dp-access-token', "gystG4wUtCCT0dkXxkMANL0PjQrCNAxxDWGkKYGQ9IkvrNo5pph78JGPWH4y-l1O_hQqxXHhdPU8dTRu25JScA"); removeHeader('remove'); setMethod("POST"); + const body = getJsonBody() } @@ -106,7 +107,7 @@ export function getJsonBody() { const contentType = currentRequest.contentType || currentRequest.headers?.['content-type'] || ''; if (!contentType.includes('application/json')) { - throw new InvalidJsonContentTypeError(); + throw new InvalidJsonContentTypeError('Invalid json body',400); } try {