mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
This commit does quite a bit: - Catches unhandled exceptions raised in the route handler and produces a 500 Internal Server Error Arch-themed response. - Each unhandled exception causes a notification to be sent to new `notifications.postmaster` email with a "Traceback ID." - Traceback ID is logged to the server along with the traceback which caused the 500: `docker-compose logs fastapi | grep '<traceback_id>'` - If `options.traceback` is set to `1`, traceback is displayed in the new 500.html template. Signed-off-by: Kevin Morris <kevr@0cost.org>
20 lines
607 B
HTML
20 lines
607 B
HTML
{% extends "partials/layout.html" %}
|
|
|
|
{% block pageContent %}
|
|
<div class="box">
|
|
<h2>500 - {{ "Internal Server Error" | tr }}</h2>
|
|
|
|
<p>
|
|
{{ "A fatal error has occurred." | tr }}
|
|
{{
|
|
"Details have been logged and will be reviewed by the "
|
|
"postmaster posthaste. We apologize for any inconvenience "
|
|
"this may have caused." | tr
|
|
}}
|
|
</p>
|
|
|
|
{% if config.getboolean("options", "traceback") %}
|
|
<pre class="traceback">{{ traceback }}</pre>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|