change(fastapi): centralize HTTPException

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-12-02 23:22:31 -08:00
parent a747548254
commit abfd41f31e
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
6 changed files with 28 additions and 51 deletions

View file

@ -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 %}

View file

@ -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 %}

View 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 %}