require 'json'

module ChefZero
  module Endpoints
    class NotFoundEndpoint
      def call(request)
        return [404, {"Content-Type" => "application/json"}, JSON.pretty_generate({"error" => ["Object not found: #{request.env['REQUEST_PATH']}"]})]
      end
    end
  end
end

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

--- 
+++ 
@@ -1,8 +1,10 @@
+require 'json'
+
 module ChefZero
   module Endpoints
     class NotFoundEndpoint
       def call(request)
-        return [404, {"Content-Type" => "application/json"}, "Object not found: #{request.env['REQUEST_PATH']}"]
+        return [404, {"Content-Type" => "application/json"}, JSON.pretty_generate({"error" => ["Object not found: #{request.env['REQUEST_PATH']}"]})]
       end
     end
   end
Return actual json in 404 (fixes issue with recent cehf bootstrap)
