I'm noticing some odd behavior when passing a JSON body in my API request. I have an AWS API Gateway setup with a Lambda function where I am trying to parse the request body.
If the function (Python) returns a json.dumps() of the request body, the API call succeeds and I'm able to see a String representation of the data I sent in the request body. If I try to reference an element within the body, however, the code fails saying the index I provided doesn't exist (despite being present in the json.dumps() version).
I replicated the request body I am sending via FlutterFlow in the Lambda console as a test event, and the function works as expected, but for some reason the JSON of the request body via FlutterFlow isn't able to be properly referenced. Images for reference below.
Here is the code that successfully returns the json.dumps() of the request body:
And it's API response:
But the code that causes an error when invoked via FlutterFlow:
The test event in AWS working:
But failing when called via FlutterFlow:
Logs: