From b28630f1556d9bbb779853c48721e532edaa78e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Wed, 7 Sep 2022 10:24:39 +0200 Subject: [PATCH] Raise error instead of set status See https://github.com/jupyter-server/jupyter_server/blob/15310fd760d21be84a1509c0f875970c0c0faaef/jupyter_server/base/handlers.py#L708 --- jupyterlab_git/handlers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jupyterlab_git/handlers.py b/jupyterlab_git/handlers.py index 16f3992a4..e7f185bf4 100644 --- a/jupyterlab_git/handlers.py +++ b/jupyterlab_git/handlers.py @@ -46,9 +46,7 @@ def prepare(self): excluded_paths = self.git.excluded_paths for excluded_path in excluded_paths: if fnmatch.fnmatchcase(path, excluded_path): - self.set_status(404) - self.finish() - break + raise tornado.web.HTTPError(404) @functools.lru_cache() def url2localpath(