提交 2a669fc8 编写于 作者: F Felix Gilcher

rescue all errors and return the proper format

This rescues all errors and returns a proper JSON response. Fixes #2833.
上级 9fdbdc66
......@@ -8,6 +8,10 @@ module Gitlab
rack_response({'message' => '404 Not found'}.to_json, 404)
end
rescue_from :all do
rack_response({'message' => '500 Internal Server Error'}, 500)
end
format :json
error_format :json
helpers APIHelpers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册