Better error pages and clean up dangling tags

This commit is contained in:
Bad Manners 2025-04-21 13:46:35 -03:00
parent 4c1a8a9489
commit e679d167fc
10 changed files with 189 additions and 50 deletions

View file

@ -1,4 +1,10 @@
{% for tag in tags %}
{% if !tags.is_empty() %}
<li>
<button hx-delete="/remove" hx-target="closest ul" hx-swap="innerHTML">
(close)
</button>
</li>
{% endif %}{% for tag in tags %}
<li>
<button
hx-post="/select_tag"

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bad request</title>
{% include "fragments/common_headers.html" %}
</head>
<body>
<div><a href="/">&lt; To home</a></div>
<main>
<h1>Bad request</h1>
<p>The provided parameters are invalid: {{ error }}</p>
</main>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Forbidden</title>
{% include "fragments/common_headers.html" %}
</head>
<body>
<div><a href="/">&lt; To home</a></div>
<main>
<h1>Forbidden</h1>
<p>The requested action is not allowed.</p>
</main>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Internal server error</title>
{% include "fragments/common_headers.html" %}
</head>
<body>
<div><a href="/">&lt; To home</a></div>
<main>
<h1>Internal server error</h1>
<p>
Something went wrong! Ask your administrator to check the application
logs.
</p>
</main>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Unauthorized</title>
{% include "fragments/common_headers.html" %}
</head>
<body>
<div><a href="/">&lt; To home</a></div>
<main>
<h1>Unauthorized</h1>
<p>The provided credentials are invalid.</p>
</main>
</body>
</html>