Exception: Chef::Exceptions::ContentLengthMismatch

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/chef/exceptions.rb

Overview

Raised when the content length of a download does not match the content length declared in the http response.

Instance Method Summary collapse

Constructor Details

#initialize(response_length, content_length) ⇒ ContentLengthMismatch

Returns a new instance of ContentLengthMismatch.



439
440
441
442
443
444
# File 'lib/chef/exceptions.rb', line 439

def initialize(response_length, content_length)
  super <<~EOF
    Response body length #{response_length} does not match HTTP Content-Length header #{content_length}.
    This error is most often caused by network issues (proxies, etc) outside of #{ChefUtils::Dist::Infra::CLIENT}.
  EOF
end