From 4bebfcbc76e2163c00c495585b7ae9aa233cdc63 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 6 Mar 2021 11:06:38 -0800 Subject: [PATCH] handle permission error correctly --- appservice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appservice.py b/appservice.py index 550dc60..f0d75cf 100644 --- a/appservice.py +++ b/appservice.py @@ -77,6 +77,9 @@ def query_alias(alias): db_session.add(rr) db_session.commit() + except pnutpy.errors.PnutPermissionDenied: + abort(401) + except Exception: logger.exception("-couldn't get the pnut channel-") abort(404)