Skip to content

Commit f87e42c

Browse files
author
Claire Goeckner-Wald
committed
Prioritize human-readable errors in all error templates
1 parent 2e34ed0 commit f87e42c

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

templates/errors/403.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
<div class="row">
77
<div class="col-md-12">
88
<div class="pt-5 mt-5 text-center">
9-
<!-- Note: Contestants hit this page when attempting to view challenges before CTF start time -->
10-
<!-- Keep "error" large and "forbidden" small to avoid concerned participants! -->
11-
<h1>{% trans %}{{ error }}{% endtrans %}</h1>
9+
<h1>{{ error }}</h1>
1210
<hr class="w-50 m-auto">
1311
<br/>
14-
<h2>(403 Forbidden)</h2>
12+
<h2>{% trans %}403 Forbidden{% endtrans %}</h2>
1513
</div>
1614
</div>
1715
</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 %}Page 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

+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>500</h1>
9+
<h1>{{ error }}</h1>
1010
<hr class="w-50 m-auto">
11-
<h2>{{ error }}</h2>
11+
<br/>
12+
<h2>{% trans %}500 Internal Server Error{% endtrans %}</h2>
1213
</div>
1314
</div>
1415
</div>

templates/errors/502.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>502</h1>
9+
<h1>{% trans %}Bad gateway{% endtrans %}</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)