Invalid status code
aarjan opened this issue · 0 comments
aarjan commented
When i run a simple Japronto server, and send 422 request code,
it returns following error:
{"message": "Unhandled exception in event loop", "lineno": 182, "pathname": "/home/aarjan/anaconda3/lib/python3.6/site-packages/japronto/app/init.py", "exc_info": "Traceback (most recent call last):\n File "uvloop/handles/stream.pyx", line 785, in uvloop.loop.__uv_stream_on_read_impl (uvloop/loop.c:76307)\n File "uvloop/handles/stream.pyx", line 559, in uvloop.loop.UVStream._on_read (uvloop/loop.c:73571)\nValueError: Invalid status code"}
The code is simple:
def hello(): return request.Response( code=422, json={"error":"schema error"}, )
It worked for other error code though.