sul-dlss-deprecated / sparql-loader

Proxies a SPARQL server and sends SNS messages when commands are processed.
0 stars 0 forks source link

Verify content type is sent #74

Closed aaron-collier closed 5 years ago

aaron-collier commented 6 years ago

While unlikely, if the Content-Type is not set a KeyError is returned. Avoid raising this exception.

'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'
aaron-collier commented 5 years ago

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.