summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/not_found_endpoint.rb
blob: 2fd4e602a5ff65efca4e5338139db574dbb9662a (plain)
1
2
3
4
5
6
7
8
9
10
11
require "ffi_yajl" unless defined?(FFI_Yajl)

module ChefZero
  module Endpoints
    class NotFoundEndpoint
      def call(request)
        [404, { "Content-Type" => "application/json" }, FFI_Yajl::Encoder.encode({ "error" => ["Object not found: #{request.env["REQUEST_PATH"]}"] }, pretty: true)]
      end
    end
  end
end