Skip to content

Commit 79cb6e5

Browse files
cgoecknerwaldClaire Goeckner-WaldColdHeat
authored
Swap 403 error messaging for legibility (#76)
* Swap 403 error messaging for legibility * Prioritize human-readable errors in all error templates * Revert changes to error code numbers * Revert change to 500.html * Revert 404 string --------- Co-authored-by: Claire Goeckner-Wald <[email protected]> Co-authored-by: Kevin Chung <[email protected]>
1 parent ba1b29c commit 79cb6e5

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

templates/errors/403.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
<div class="row">
77
<div class="col-md-12">
88
<div class="pt-5 mt-5 text-center">
9-
<h1>{% trans %}Forbidden{% endtrans %}</h1>
9+
<h1>{{ error }}</h1>
1010
<hr class="w-50 m-auto">
11-
<h2>{{ error }}</h2>
11+
<br/>
12+
<h2>{% trans %}403 Forbidden{% endtrans %}</h2>
1213
</div>
1314
</div>
1415
</div>

templates/errors/404.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<div class="row">
77
<div class="col-md-12">
88
<div class="pt-5 mt-5 text-center">
9-
<h1>404</h1>
9+
<h1>{% trans %}File not found{% endtrans %}</h1>
1010
<hr class="w-50 m-auto">
11-
<h2>{% trans %}File not found{% endtrans %}</h2>
12-
<h2>{% trans %}Sorry about that{% endtrans %}</h2>
11+
<br/>
12+
<h2>{% trans %}404 Not Found{% endtrans %}</h2>
1313
</div>
1414
</div>
1515
</div>

templates/errors/429.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
<div class="row">
77
<div class="col-md-12">
88
<div class="pt-5 mt-5 text-center">
9-
<h1>429</h1>
9+
<h1>{% trans %}Too many requests{% endtrans %}</h1>
10+
<h1>{% trans %}Please slow down!{% endtrans %}</h1>
1011
<hr class="w-50 m-auto">
11-
<h2>{% trans %}Too many requests{% endtrans %}</h2>
12-
<h2>{% trans %}Please slow down!{% endtrans %}</h2>
12+
<br/>
13+
<h2>{% trans %}429 Too Many Requests{% endtrans %}</h2>
1314
</div>
1415
</div>
1516
</div>

templates/errors/500.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<div class="pt-5 mt-5 text-center">
99
<h1>500</h1>
1010
<hr class="w-50 m-auto">
11+
<br/>
1112
<h2>{{ error }}</h2>
1213
</div>
1314
</div>

templates/errors/502.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<div class="pt-5 mt-5 text-center">
99
<h1>502</h1>
1010
<hr class="w-50 m-auto">
11-
<h2>{% trans %}Bad Gateway{% endtrans %}</h2>
11+
<br/>
12+
<h2>{% trans %}502 Bad Gateway{% endtrans %}</h2>
1213
</div>
1314
</div>
1415
</div>

0 commit comments

Comments
 (0)