Exception: Spaceship::TooManyRequestsError
- Inherits:
-
BasicPreferredInfoError
- Object
- Exception
- StandardError
- BasicPreferredInfoError
- Spaceship::TooManyRequestsError
- Defined in:
- spaceship/lib/spaceship/errors.rb
Overview
Raised when 429 is received from App Store Connect
Constant Summary
Constants inherited from BasicPreferredInfoError
BasicPreferredInfoError::TITLE
Instance Attribute Summary collapse
-
#rate_limit_user ⇒ Object
readonly
Returns the value of attribute rate_limit_user.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
-
#initialize(resp_hash) ⇒ TooManyRequestsError
constructor
A new instance of TooManyRequestsError.
- #show_github_issues ⇒ Object
Methods inherited from BasicPreferredInfoError
Methods inherited from StandardError
Methods inherited from Exception
#fastlane_should_report_metrics?
Constructor Details
#initialize(resp_hash) ⇒ TooManyRequestsError
Returns a new instance of TooManyRequestsError.
51 52 53 54 55 56 57 58 |
# File 'spaceship/lib/spaceship/errors.rb', line 51 def initialize(resp_hash) headers = resp_hash[:response_headers] || {} @retry_after = (headers['retry-after'] || 60).to_i @rate_limit_user = headers['x-daiquiri-rate-limit-user'] = 'Apple 429 detected' += " - #{rate_limit_user}" if rate_limit_user super() end |
Instance Attribute Details
#rate_limit_user ⇒ Object (readonly)
Returns the value of attribute rate_limit_user.
49 50 51 |
# File 'spaceship/lib/spaceship/errors.rb', line 49 def rate_limit_user @rate_limit_user end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
48 49 50 |
# File 'spaceship/lib/spaceship/errors.rb', line 48 def retry_after @retry_after end |
Instance Method Details
#show_github_issues ⇒ Object
60 61 62 |
# File 'spaceship/lib/spaceship/errors.rb', line 60 def show_github_issues false end |