more
This commit is contained in:
@ -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
12
app/templates/400.html
Normal 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 couldn’t understand that request." }}</p>
|
||||
<a href="{{ url_for('main.index') }}">Return home</a>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user