Send 500 errors as JSON in the API

This commit is contained in:
jubianchi 2015-01-29 08:22:07 +01:00
parent fbb5a359fe
commit 79d0b69345

View file

@ -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