sloev/python-lambdarest

lambdarest returns stacktrace if not run under "lambda proxy"

sloev opened this issue · 1 comments

sloev commented

we need to catch if event is not compliant with lambda proxy
returning stacktrace is not acceptable

{
  "stackTrace": [
    [
      "/var/task/lambdarest/__init__.py",
      65,
      "inner_lambda_handler",
      "method_name = event[\"httpMethod\"].lower()"
    ]
  ],
  "errorType": "KeyError",
  "errorMessage": "'httpMethod'"
}