From 84a78a5048797db91556729000555cff5692fd78 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 13 Jul 2021 11:02:18 -0400 Subject: [PATCH] Island: Don't catch Exception in POST /api/island-mode Flask automatically traps exceptions, returns a 500, and logs a stack trace. Since Flask will automatically return a 500, we don't need to duplicate the functionality. Since it prints a stack trace, it provides more useful information than catching it did. --- monkey/monkey_island/cc/resources/island_mode.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/monkey/monkey_island/cc/resources/island_mode.py b/monkey/monkey_island/cc/resources/island_mode.py index 5a83fb46a..51df90e2d 100644 --- a/monkey/monkey_island/cc/resources/island_mode.py +++ b/monkey/monkey_island/cc/resources/island_mode.py @@ -26,5 +26,3 @@ class IslandMode(flask_restful.Resource): return make_response({}, 400) except ValueError: return make_response({}, 422) - except Exception: - return make_response({}, 500)