From: Michael Tremer Date: Fri, 21 Jul 2023 09:52:35 +0000 (+0000) Subject: web: jobs: Add HTTP status code to exception X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b7fbf0990c1caa8e96bf1a02ed42b533edbcbbc;p=pbs.git web: jobs: Add HTTP status code to exception Signed-off-by: Michael Tremer --- diff --git a/src/web/jobs.py b/src/web/jobs.py index d15ef328..6c7e2c5c 100644 --- a/src/web/jobs.py +++ b/src/web/jobs.py @@ -143,7 +143,7 @@ class LogHandler(base.BaseHandler): async def get(self, uuid): job = self.backend.jobs.get_by_uuid(uuid) if not job: - raise tornado.web.HTTPError("Could not find job %s" % uuid) + raise tornado.web.HTTPError(404, "Could not find job %s" % uuid) # Stream the log if the job is running if job.is_running():