Exception: IBMWatson::Errors::RateLimitReached

Inherits:
WatsonRequestError show all
Defined in:
lib/ibm_watson/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, data, headers) ⇒ RateLimitReached



14
15
16
17
# File 'lib/ibm_watson/errors.rb', line 14

def initialize(message, data, headers)
  @retry_after = headers['retry-after'].to_f
  super(message)
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



19
20
21
# File 'lib/ibm_watson/errors.rb', line 19

def retry_after
  @retry_after
end

Class Method Details

.from_dataObject



10
11
12
# File 'lib/ibm_watson/errors.rb', line 10

def self.from_data
  # does nothing, just a marker
end