return 404 when record not found
This commit is contained in:
parent
f086676b7c
commit
efa21573df
|
@ -5,6 +5,10 @@ module Gitlab
|
|||
VERSION = 'v2'
|
||||
version VERSION, :using => :path
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound do
|
||||
rack_response({'message' => '404 Not found'}.to_json, 404)
|
||||
end
|
||||
|
||||
format :json
|
||||
error_format :json
|
||||
helpers APIHelpers
|
||||
|
|
Loading…
Reference in a new issue