Commit 285cf3f7 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Merge pull request #8677 from jubianchi/api-500-json

Send 500 errors as JSON in the API
parents 822ba95f 79d0b693
...@@ -19,7 +19,7 @@ module API ...@@ -19,7 +19,7 @@ module API
message << " " << trace.join("\n ") message << " " << trace.join("\n ")
API.logger.add Logger::FATAL, message 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 end
format :json format :json
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment