Try to show exception information in the test
This commit is contained in:
parent
c772464b68
commit
8730cd8657
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue