fix broken error handling for invalid json

This commit is contained in:
Alex Yatskov 2017-09-15 22:17:52 -07:00
parent d05ba3c4ed
commit 065c199105

View File

@ -268,7 +268,7 @@ class AjaxServer:
params = json.loads(makeStr(req.body))
body = makeBytes(json.dumps(self.handler(params)))
except ValueError:
body = json.dumps(None);
body = makeBytes(json.dumps(None))
resp = bytes()