Using a content type of JSON, the body is a python dict, which means accessing attributes of the body incorrectly may result in a KeyError. It would be better if the body was either a modified dict, that instead of throwing KeyError would just return None, or else a custom body object where attributes could be accessed as object attributes; ie req.body.value instead of req.body['value'].