Commit efa21573 authored by Nihad Abbasov's avatar Nihad Abbasov

return 404 when record not found

parent f086676b
......@@ -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)
format :json
error_format :json
helpers APIHelpers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment