diff --git a/ctrl/app.py b/ctrl/app.py index 58c7c13..d16e1d9 100644 --- a/ctrl/app.py +++ b/ctrl/app.py @@ -5,6 +5,7 @@ import os import queue from flask import Flask, jsonify, request, send_from_directory, Response +from werkzeug.exceptions import HTTPException import ctrl.db as db import ctrl.settings as settings @@ -150,6 +151,8 @@ def api_stream(job_id): @app.errorhandler(Exception) def _handle_error(err): + if isinstance(err, HTTPException): + return err log.exception("Unhandled error serving %s %s", request.method, request.path) return jsonify({"error": f"{type(err).__name__}: {err}"}), 500 diff --git a/ctrl/static/style.css b/ctrl/static/style.css index 67d905e..d4a876e 100644 --- a/ctrl/static/style.css +++ b/ctrl/static/style.css @@ -93,6 +93,7 @@ button:hover { filter: brightness(1.1); } .badge.queued, .badge.dispatching, .badge.building { background: #1c2a40; color: var(--accent); } .badge.cancelled { background: var(--panel-2); color: var(--muted); } +.modal[hidden] { display: none; } .modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65);