mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(fastapi): centralize HTTPException
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a747548254
commit
abfd41f31e
6 changed files with 28 additions and 51 deletions
|
@ -1,8 +0,0 @@
|
|||
{% extends 'partials/layout.html' %}
|
||||
|
||||
{% block pageContent %}
|
||||
<div id="error-page" class="box 404">
|
||||
<h2>404 - {% trans %}Page Not Found{% endtrans %}</h2>
|
||||
<p>{% trans %}Sorry, the page you've requested does not exist.{% endtrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,8 +0,0 @@
|
|||
{% extends 'partials/layout.html' %}
|
||||
|
||||
{% block pageContent %}
|
||||
<div id="error-page" class="box 503">
|
||||
<h2>503 - {% trans %}Service Unavailable{% endtrans %}</h2>
|
||||
<p>{% trans %}Don't panic! This site is down due to maintenance. We will be back soon.{% endtrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
8
templates/errors/detail.html
Normal file
8
templates/errors/detail.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% extends 'partials/layout.html' %}
|
||||
|
||||
{% block pageContent %}
|
||||
<div id="error-page" class="box">
|
||||
<h2>{{ "%d" | format(exc.status_code) }} - {{ phrase }}</h2>
|
||||
<p>{{ exc.detail }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue