We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0934e05 commit ed81111Copy full SHA for ed81111
index.py
@@ -11,6 +11,15 @@ def handler(event, context):
11
# Log the input event for debugging purposes
12
print("Received event:", json.dumps(event, indent=2))
13
14
+ if "body" in event:
15
+ try:
16
+ event = json.loads(event["body"])
17
+ except json.JSONDecodeError:
18
+ return {
19
+ "statusCode": 400,
20
+ "body": "Invalid JSON format in the body. Please check the input."
21
+ }
22
+
23
if "message" not in event:
24
return {
25
"statusCode": 400,
0 commit comments