mirror of
https://github.com/FAUSheppy/simple-webhook-handler
synced 2025-12-06 04:11:35 +01:00
add unique error message for missing json data
This commit is contained in:
@@ -20,6 +20,11 @@ def rootPage():
|
||||
return "Webhook Listener ist running"
|
||||
else:
|
||||
data = flask.request.json
|
||||
if data == None:
|
||||
retString = "POST-request is missing payload."
|
||||
print(retString, file=sys.stderr)
|
||||
return (retString, 400)
|
||||
|
||||
print(json.dumps(flask.request.json, indent=4, sort_keys=True))
|
||||
|
||||
# check for project in request
|
||||
|
||||
Reference in New Issue
Block a user