Exception: OpenFeature::GoFeatureFlag::RateLimited
- Inherits:
-
StandardError
- Object
- StandardError
- OpenFeature::GoFeatureFlag::RateLimited
- Defined in:
- lib/openfeature/go-feature-flag/error/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ RateLimited
constructor
A new instance of RateLimited.
Constructor Details
#initialize(response) ⇒ RateLimited
Returns a new instance of RateLimited.
67 68 69 70 71 72 73 |
# File 'lib/openfeature/go-feature-flag/error/errors.rb', line 67 def initialize(response) = response.nil? ? "Rate limited" : "Rate limited: " + response["Retry-After"].to_s @response = response @error_code = SDK::Provider::ErrorCode::GENERAL @error_message = super() end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
65 66 67 |
# File 'lib/openfeature/go-feature-flag/error/errors.rb', line 65 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
65 66 67 |
# File 'lib/openfeature/go-feature-flag/error/errors.rb', line 65 def @error_message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
65 66 67 |
# File 'lib/openfeature/go-feature-flag/error/errors.rb', line 65 def response @response end |