diff options
Diffstat (limited to 'lib/chef_zero/endpoints/not_found_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/not_found_endpoint.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/not_found_endpoint.rb b/lib/chef_zero/endpoints/not_found_endpoint.rb index edbf239..ddf1246 100644 --- a/lib/chef_zero/endpoints/not_found_endpoint.rb +++ b/lib/chef_zero/endpoints/not_found_endpoint.rb @@ -1,10 +1,10 @@ -require 'json' +require 'ffi_yajl' 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']}"]})] + return [404, {"Content-Type" => "application/json"}, FFI_Yajl::Encoder.encode({"error" => ["Object not found: #{request.env['REQUEST_PATH']}"]}, :pretty => true)] end end end |