From 688fa30ec7ee3d4f0b21e3a98525559fb326ba38 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Mon, 10 Feb 2014 20:08:00 -0500 Subject: [PATCH] Do not 500 on missing player_ids. 404 instead. --- xonstat/views/player.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 19ec081..5e56b08 100644 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -525,16 +525,9 @@ def player_info_data(request): cake_day = is_cake_day(player.create_dt) except Exception as e: - player = None - games_played = None - overall_stats = None - fav_maps = None - elos = None - ranks = None - recent_games = None - recent_weapons = [] - cake_day = False - ## do not raise exceptions here (only for debugging) + raise pyramid.httpexceptions.HTTPNotFound + + ## do not raise application exceptions here (only for debugging) # raise e return {'player':player, -- 2.39.2