Files
eveAI/eveai_chat_client/views/error_views.py
Josako bc1626c4ff - Initialisation of the EveAI Chat Client.
- Introduction of Tenant Makes
2025-06-06 16:42:24 +02:00

24 lines
588 B
Python

from flask import Blueprint, render_template
error_bp = Blueprint('error', __name__)
@error_bp.route('/error')
def error_page():
"""
Generic error page
"""
return render_template('error.html', message="An error occurred.")
@error_bp.app_errorhandler(404)
def page_not_found(e):
"""
Handle 404 errors
"""
return render_template('error.html', message="Page not found."), 404
@error_bp.app_errorhandler(500)
def internal_server_error(e):
"""
Handle 500 errors
"""
return render_template('error.html', message="Internal server error."), 500