diff --git a/pygmyui/restclient/error_msg.py b/pygmyui/restclient/error_msg.py index ecae0d1..795c2c3 100644 --- a/pygmyui/restclient/error_msg.py +++ b/pygmyui/restclient/error_msg.py @@ -1,8 +1,8 @@ import json -INVALID_TOKEN = dict(error="Please log in again to continue.") -INTERNAL_SERVER_ERROR_API = "Something went wrong." +INVALID_TOKEN = dict(error=["Please log in again to continue."]) +INTERNAL_SERVER_ERROR_API = ["Something went wrong."] def API_ERROR(error_message): @@ -19,4 +19,4 @@ def API_ERROR(error_message): import traceback traceback.print_exc() error_message = INTERNAL_SERVER_ERROR_API - return dict(error=error_message) + return dict(error=error_message if isinstance(error_message,list) else [error_message]) diff --git a/pygmyui/templates/400.html b/pygmyui/templates/400.html index 8785517..07c8d94 100644 --- a/pygmyui/templates/400.html +++ b/pygmyui/templates/400.html @@ -3,7 +3,9 @@ {% block content %}