Exception: HCl::TimesheetResource::ThrottleFailure
- Inherits:
-
StandardError
- Object
- StandardError
- HCl::TimesheetResource::ThrottleFailure
- Defined in:
- lib/hcl/timesheet_resource.rb
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
-
#initialize(response) ⇒ ThrottleFailure
constructor
A new instance of ThrottleFailure.
Constructor Details
#initialize(response) ⇒ ThrottleFailure
Returns a new instance of ThrottleFailure.
11 12 13 14 |
# File 'lib/hcl/timesheet_resource.rb', line 11 def initialize response @retry_after = response.headers['Retry-After'].to_i super "Too many requests! Try again in #{@retry_after} seconds." end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
10 11 12 |
# File 'lib/hcl/timesheet_resource.rb', line 10 def retry_after @retry_after end |