Commit c89e2080 authored by Michael Murtaugh's avatar Michael Murtaugh

return proper 404 + 500 errors

parent b5f36f9d
Pipeline #234 canceled with stages
......@@ -110,7 +110,8 @@ async def route_get (request):
return web.FileResponse(path, chunk_size=256*1024)
return web.Response(text="404 on path {0}".format(path))
raise web.HTTPNotFound()
# return web.Response(text="404 on path {0}".format(path))
async def route_post (request):
""" write posted text value to file """
......@@ -138,7 +139,8 @@ async def route_post (request):
resp['delete'] = 'ok'
return web.Response(text=json.dumps(resp), content_type="application/json")
return web.Response(text="post not allowed on {0}".format(path))
raise web.HTTPMethodNotAllowed()
# return web.Response(text="post not allowed on {0}".format(path))
active_sockets = []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment