-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
if request.method == 'POST' and isinstance(request.json, JussiJSONRPCRequest):
will, in some circumstances produce this error:
{
"event": "finalize_jussi error",
"logger": "jussi.middlewares.jussi",
"level": "warning",
"exception": "Traceback (most recent call last):\n
File \"/app/.venv/lib/python3.6/site-packages/sanic/request.py\", line 89, in load_json\n self.parsed_json = loads(self.body)\n
ValueError: Expected object or value\n\n
During handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n
File \"/app/jussi/middlewares/jussi.py\", line 56, in finalize_jussi_response\n
if request.method == POST and isinstance(request.json, JussiJSONRPCRequest):\n
File \"/app/.venv/lib/python3.6/site-packages/sanic/request.py\", line 83, in json\n
self.load_json()\n
File \"/app/.venv/lib/python3.6/site-packages/sanic/request.py\", line 93, in load_json\n
raise InvalidUsage(\"Failed when parsing body as json\")\n
sanic.exceptions.InvalidUsage: Failed when parsing body as json"
}
Reactions are currently unavailable