From a62e7bc6dee512703f77f0e4a36632a6f112f90c Mon Sep 17 00:00:00 2001 From: BluBb_mADe Date: Tue, 4 Jun 2019 18:38:10 +0200 Subject: [PATCH] return bad request on missing acc param instead of 500 --- sharex_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharex_server.py b/sharex_server.py index 54bd82a..fda9d6f 100644 --- a/sharex_server.py +++ b/sharex_server.py @@ -47,7 +47,7 @@ def sizeof_fmt(num, suffix='B'): async def prepare(_, handler): async def prepare_handler(req): if 'acc' not in req.match_info: - return web.Response(text='internal server error', status=500) + return web.Response(text='bad request', status=400) return await handler(req, req.match_info["acc"], file_db[req.match_info["acc"]]) return prepare_handler