Closed aaron-collier closed 5 years ago
While unlikely, if the Content-Type is not set a KeyError is returned. Avoid raising this exception.
Content-Type
KeyError
'Content-Type': KeyError Traceback (most recent call last): File "/var/task/handler.py", line 40, in main request_content_type = event['headers']['Content-Type'] KeyError: 'Content-Type'
This seems to be a non-issue as it's from the command line (i.e. running curl) and the crash is probably ok in that case.
curl
While unlikely, if the
Content-Type
is not set aKeyError
is returned. Avoid raising this exception.