Exception: RemoveBg::HttpError

Inherits:
Error
  • Object
show all
Defined in:
lib/remove_bg/error.rb

Direct Known Subclasses

ClientHttpError, ServerHttpError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, http_response, http_response_body) ⇒ HttpError

Returns a new instance of HttpError.



13
14
15
16
17
# File 'lib/remove_bg/error.rb', line 13

def initialize(message, http_response, http_response_body)
  @http_response = http_response
  @http_response_body = http_response_body
  super(message)
end

Instance Attribute Details

#http_responseFaraday::Response (readonly)

Returns:

  • (Faraday::Response)


8
9
10
# File 'lib/remove_bg/error.rb', line 8

def http_response
  @http_response
end

#http_response_bodyString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/remove_bg/error.rb', line 11

def http_response_body
  @http_response_body
end