From 4b8f87132b6c0cde7c22fe35259f2dd885920482 Mon Sep 17 00:00:00 2001 From: Vijayabhaskar Date: Fri, 2 Feb 2018 15:24:22 +0530 Subject: [PATCH] fix json invalid payload message type invalid payload message is now encoded as JSON object rather than treated as dict, which throws errors on some machines. --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index 07abf51..01cab23 100644 --- a/api.py +++ b/api.py @@ -42,7 +42,7 @@ def publish(): try: data = json.loads(payload) except: - return {'error':'invalid payload'} + return jsonify({'error':'invalid payload'}) def notify(): msg = str(time.time())