Exception: RemoveBg::RateLimitError

Inherits:
ClientHttpError show all
Defined in:
lib/remove_bg/error.rb

Overview

Raised for HTTP 429 status code

Instance Attribute Summary collapse

Attributes inherited from HttpError

#http_response, #http_response_body

Instance Method Summary collapse

Constructor Details

#initialize(message, http_response, http_response_body, rate_limit) ⇒ RateLimitError

Returns a new instance of RateLimitError.



30
31
32
33
# File 'lib/remove_bg/error.rb', line 30

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

Instance Attribute Details

#rate_limitObject (readonly)

Returns the value of attribute rate_limit.



28
29
30
# File 'lib/remove_bg/error.rb', line 28

def rate_limit
  @rate_limit
end