Sha256: fd340da2823f49ec3903ae146dbf878c410ad1c8dbc31b8a3c0939bb3487b362

Contents?: true

Size: 678 Bytes

Versions: 6

Compression:

Stored size: 678 Bytes

Contents

# Module gets mixed in to Net::HTTP exception classes so we can attach our
# RESTRequest object to them and get the request parameters back out later.
module ChefNetHTTPExceptionExtensions
  attr_accessor :chef_rest_request
end

require "net/http" unless defined?(Net::HTTP)
module Net
  class HTTPError < Net::ProtocolError
    include ChefNetHTTPExceptionExtensions
  end
  class HTTPRetriableError < Net::ProtoRetriableError
    include ChefNetHTTPExceptionExtensions
  end
  class HTTPClientException < Net::ProtoServerError
    include ChefNetHTTPExceptionExtensions
  end
  class HTTPFatalError < Net::ProtoFatalError
    include ChefNetHTTPExceptionExtensions
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chef-16.6.14-universal-mingw32 lib/chef/monkey_patches/net_http.rb
chef-16.6.14 lib/chef/monkey_patches/net_http.rb
chef-16.5.77 lib/chef/monkey_patches/net_http.rb
chef-16.5.77-universal-mingw32 lib/chef/monkey_patches/net_http.rb
chef-16.5.64 lib/chef/monkey_patches/net_http.rb
chef-16.5.64-universal-mingw32 lib/chef/monkey_patches/net_http.rb