diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index 33621fc..9acb42d 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -95,9 +95,14 @@ class DispatchHandler(tornado.web.RequestHandler): def _selfGetAdList(self): - input = json.loads(self.get_query_argument('body')) - gameid = input['gameid'] - locationid = input['locationid'] + try: + input = json.loads(self.get_query_argument('body')) + gameid = input['gameid'] + locationid = input['locationid'] + except Exception as e: + result = {'errcode': 2, "errmsg": e} + self.write(result) + key = f"{gameid}::{locationid}" ids = my_redis.smembers(key) info = []