Commit 8730cd86 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Try to show exception information in the test

parent c772464b
...@@ -257,7 +257,15 @@ module API ...@@ -257,7 +257,15 @@ 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' }.to_json, 500)
response_message =
if Rails.env.test?
message
else
'500 Internal Server Error'
end
rack_response({ 'message' => response_message }.to_json, 500)
end end
# project helpers # project helpers
......
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