From 4438e8f2ff9072f8e479c262f268ceea1ddcc116 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:06:05 +0100 Subject: [PATCH] remove code 500 on invalid npc --- truthinquiry/routes/routes_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truthinquiry/routes/routes_api.py b/truthinquiry/routes/routes_api.py index b4c65a6..4f797d0 100644 --- a/truthinquiry/routes/routes_api.py +++ b/truthinquiry/routes/routes_api.py @@ -149,7 +149,7 @@ def get_npc_reaction(): image = game.get_npc_reaction(npc_id) errors = ["npc not in game","error reading file"] if image in [0,1]: - return {"error" :1, "msg": errors[image]} , 500 + return {"error": 1, "msg": errors[image]} response = flask.make_response(image) response.headers.set('Content-Type', 'image/png')