diff --git a/app/templates/domain_management.html b/app/templates/domain_management.html
index b7bbf84..8ca8507 100644
--- a/app/templates/domain_management.html
+++ b/app/templates/domain_management.html
@@ -2,14 +2,18 @@
{% block title %}
DNS Control Panel - Domain Management{% endblock %}
{% block dashboard_stat %}
- {% if status != None %}
- {% if status['status'] == 'ok' %}
+ {% if status %}
+ {% if status.get('status') == 'ok' %}
- Success! {{ status['msg'] }}
+ Success! {{ status.get('msg') }}
- {% else %}
+ {% elif status.get('status') == 'error' %}
- Error! {{ status['msg'] }}
+ {% if status.get('msg') != None %}
+ Error! {{ status.get('msg') }}
+ {% else %}
+ Error! An undefined error occurred.
+ {% endif %}
{% endif %}
{% endif %}