This commit is contained in:
2025-05-27 04:23:51 -05:00
parent f4bcf72b9b
commit 381f78b4e2
12 changed files with 282 additions and 79 deletions

View File

@ -6,6 +6,10 @@ bp = Blueprint('errors', __name__)
def bad_request(error):
return render_template('400.html'), 400
@bp.app_errorhandler(404)
def bad_request(error):
return render_template('404.html'), 404
@bp.app_errorhandler(500)
def internal_error(error):
return render_template('500.html'), 500

12
app/templates/400.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
<p>{{ e.description or "Sorry, we couldnt understand that request." }}</p>
<a href="{{ url_for('main.index') }}">Return home</a>
</body>
</html>