Exception: ExrtaSpace::FetchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/extraspace/fetch_error.rb

Overview

Raised for unexpected HTTP responses.

Instance Method Summary collapse

Constructor Details

#initialize(url:, response:) ⇒ FetchError

Returns a new instance of FetchError.

Parameters:

  • url (String)
  • response (HTTP::Response)


8
9
10
# File 'lib/extraspace/fetch_error.rb', line 8

def initialize(url:, response:)
  super("url=#{url} status=#{response.status.inspect} body=#{String(response.body).inspect}")
end