aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/error_handlers
diff options
context:
space:
mode:
Diffstat (limited to 'pysite/views/error_handlers')
-rw-r--r--pysite/views/error_handlers/http_4xx.py6
-rw-r--r--pysite/views/error_handlers/http_5xx.py6
2 files changed, 5 insertions, 7 deletions
diff --git a/pysite/views/error_handlers/http_4xx.py b/pysite/views/error_handlers/http_4xx.py
index 48ae7f0f..2d6c54c6 100644
--- a/pysite/views/error_handlers/http_4xx.py
+++ b/pysite/views/error_handlers/http_4xx.py
@@ -11,7 +11,6 @@ class Error400View(ErrorView):
error_code = range(400, 430)
def __init__(self):
-
# Direct errors for all methods at self.return_error
methods = [
'get', 'post', 'put',
@@ -27,7 +26,6 @@ class Error400View(ErrorView):
return self.render(
"errors/error.html", code=error.code, req=request, error_title=error_desc,
- error_message=error_desc +
- " If you believe we have made a mistake, please "
- "<a href='https://github.com/discord-python/site/issues'>open an issue on our GitHub</a>."
+ error_message=f"{error_desc} If you believe we have made a mistake, please "
+ "<a href='https://github.com/discord-python/site/issues'>open an issue on our GitHub</a>."
), error.code
diff --git a/pysite/views/error_handlers/http_5xx.py b/pysite/views/error_handlers/http_5xx.py
index 14c016c5..46c65e38 100644
--- a/pysite/views/error_handlers/http_5xx.py
+++ b/pysite/views/error_handlers/http_5xx.py
@@ -36,7 +36,7 @@ class Error500View(ErrorView):
return self.render(
"errors/error.html", code=error.code, req=request, error_title=error_desc,
error_message="An error occurred while processing this request, please try "
- "again later. If you believe we have made a mistake, please "
- "<a href='https://github.com/discord-python/site/issues'>file an issue on our"
- " GitHub</a>."
+ "again later. If you believe we have made a mistake, please "
+ "<a href='https://github.com/discord-python/site/issues'>file an issue on our"
+ " GitHub</a>."
), error.code