]> git.ipfire.org Git - pbs.git/commitdiff
web: jobs: Add HTTP status code to exception
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 09:52:35 +0000 (09:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 09:52:35 +0000 (09:52 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/jobs.py

index d15ef328a0f412d48de115ecc151254a620ccaa4..6c7e2c5ca3473ca0661930db2662d86b61e1da5c 100644 (file)
@@ -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():