From 79d0b69345477fca94818a1c9d18b6a936e82189 Mon Sep 17 00:00:00 2001 From: jubianchi Date: Thu, 29 Jan 2015 08:22:07 +0100 Subject: Send 500 errors as JSON in the API --- lib/api/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/api.rb') diff --git a/lib/api/api.rb b/lib/api/api.rb index 60858a39407..d2a35c78fc1 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -19,7 +19,7 @@ module API message << " " << trace.join("\n ") API.logger.add Logger::FATAL, message - rack_response({ 'message' => '500 Internal Server Error' }, 500) + rack_response({ 'message' => '500 Internal Server Error' }.to_json, 500) end format :json -- cgit v1.2.1