I'm trying to do a mapping from AWS lambda function response using regex.
This is my regex:
.*statusCode”:406.*
As you can see - I am trying for it to take a specific mapping from the following response:
{
"statusCode": 406,
"body": "{\"aerocrs\":{\"success\":false,\"error_type\":\"request\",\"details\":{\"detail\":\"Incorrect reqyest \",\"errorCode\":4}}}",
"headers": {
"x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "116",
"etag": "W/\"74-Zzo6HU1M1kKkLM9KGtX0jJdePQY\"",
"date": "Thu, 28 Nov 2019 16:03:05 GMT",
"connection": "close"
},
"isBase64Encoded": false
}
However, I always get to the default mapping.
When I change the mapping to .*.*, it gets to the correct one, which makes sense, but for some reason this regex isn't working.
Do you have any idea?
Thanks!