diff --git a/templates/error-page.html b/templates/error-page.html
index 2d01f698963..6b513d37b80 100644
--- a/templates/error-page.html
+++ b/templates/error-page.html
@@ -3,7 +3,7 @@
{% block regular_content %}
-
+
{{page_error}}
diff --git a/utils.py b/utils.py
index 9d03f37ff7c..c80e844cd0f 100644
--- a/utils.py
+++ b/utils.py
@@ -329,8 +329,10 @@ def error_page(error=404, page_error=None, ui_message=None, menu=True, iframe=No
if error not in [400, 403, 404, 500, 401]:
error = 404
default = gettext('default_404')
+ error_image = error
if error == 401:
default = gettext('default_401')
+ error_image = 403
if error == 403:
default = gettext('default_403')
elif error == 500:
@@ -347,8 +349,8 @@ def error_page(error=404, page_error=None, ui_message=None, menu=True, iframe=No
"error": default,
"exception": traceback.format_exception(type(exception), exception, exception.__traceback__) if exception else None}, error)
- return render_template("error-page.html", menu=menu, error=error, iframe=iframe,
- page_error=page_error or ui_message or '', default=default), error
+ return render_template("error-page.html", menu=menu, error_image=error_image, iframe=iframe,
+ page_error=page_error or ui_message or default or '', default=default), error
def session_id():