Commit 1d2c98186014cedc01f04382d507a34a71008ab1
1 parent
0d67f209
Exists in
master
and in
4 other branches
return errors in json format
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
lib/api.rb
| @@ -3,6 +3,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file} | @@ -3,6 +3,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file} | ||
| 3 | module Gitlab | 3 | module Gitlab |
| 4 | class API < Grape::API | 4 | class API < Grape::API |
| 5 | format :json | 5 | format :json |
| 6 | + error_format :json | ||
| 6 | helpers APIHelpers | 7 | helpers APIHelpers |
| 7 | 8 | ||
| 8 | mount Users | 9 | mount Users |
lib/api/helpers.rb