Exception: Contentful::Management::RateLimitExceeded

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

Overview

429

Constant Summary collapse

RATE_LIMIT_RESET_HEADER_KEY =

Rate Limit Reset Header Key

'x-contentful-ratelimit-reset'

Instance Attribute Summary

Attributes inherited from Error

#error, #response

Instance Method Summary collapse

Methods inherited from Error

[], #initialize

Constructor Details

This class inherits a constructor from Contentful::Management::Error

Instance Method Details

#reset_timeObject

Time until next available request, in seconds.



192
193
194
# File 'lib/contentful/management/error.rb', line 192

def reset_time
  @reset_time ||= @response.raw[RATE_LIMIT_RESET_HEADER_KEY]
end

#reset_time?Boolean

Returns:

  • (Boolean)


185
186
187
188
189
# File 'lib/contentful/management/error.rb', line 185

def reset_time?
  # rubocop:disable Style/DoubleNegation
  !!reset_time
  # rubocop:enable Style/DoubleNegation
end