Exception: Clients::HttpClientError

Inherits:
ClientError
  • Object
show all
Defined in:
lib/clients/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = "Failed request", url: nil, proxy: nil, cause: $!) ⇒ HttpClientError

rubocop:disable Style/SpecialGlobalVars:



6
7
8
9
10
11
# File 'lib/clients/errors.rb', line 6

def initialize(msg = "Failed request", url: nil, proxy: nil, cause: $!)
  msg << " at #{url}" if url
  msg << " via #{proxy.host}:#{proxy.port}" if proxy
  msg << " caused by #{cause.class}: #{cause.message}" if cause
  super msg
end