From 00f32d43d32b7194f72d2509f872202559df5fa4 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 15 May 2017 21:46:35 +0100 Subject: [PATCH] Fix displaying error messages in error response. --- html/website/error.html.mstch | 4 ++-- src/tawashi_implem/error_response.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/website/error.html.mstch b/html/website/error.html.mstch index 66c31da..2883a22 100644 --- a/html/website/error.html.mstch +++ b/html/website/error.html.mstch @@ -3,8 +3,8 @@
- {{> error_code}} - {{> error_message}} + {{error_code}} + {{error_message}}
diff --git a/src/tawashi_implem/error_response.cpp b/src/tawashi_implem/error_response.cpp index 350ae0f..f293669 100644 --- a/src/tawashi_implem/error_response.cpp +++ b/src/tawashi_implem/error_response.cpp @@ -49,7 +49,7 @@ namespace tawashi { "Unable to connect to Redis." }; - parContext["error_message"] = err_descs[reason_code]; + parContext["error_message"] = std::string(err_descs[reason_code]); parContext["error_code"] = std::to_string(err_code); parContext["error_id"] = std::to_string(reason_code); }