Skip to content
Snippets Groups Projects
Commit 1d2c9818 authored by Nihad Abbasov's avatar Nihad Abbasov
Browse files

return errors in json format

parent 0d67f209
No related branches found
No related tags found
1 merge request!1019API
Loading
Loading
@@ -3,6 +3,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module Gitlab
class API < Grape::API
format :json
error_format :json
helpers APIHelpers
 
mount Users
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ module Gitlab
end
 
def authenticate!
error!('401 Unauthorized', 401) unless current_user
error!({'message' => '401 Unauthorized'}, 401) unless current_user
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment