Exception: GetFluxly::Error
- Inherits:
-
StandardError
- Object
- StandardError
- GetFluxly::Error
- Defined in:
- lib/getfluxly/error.rb
Overview
Every error raised by the SDK is a GetFluxly::Error. ‘code` is one of the strings from docs/sdk-standards/error-taxonomy.md and is stable across SDK versions.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#retry_after_ms ⇒ Object
readonly
Returns the value of attribute retry_after_ms.
-
#retryable ⇒ Object
readonly
Returns the value of attribute retryable.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, code:, retryable: false, retry_after_ms: nil, status: nil, details: nil) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(message, code:, retryable: false, retry_after_ms: nil, status: nil, details: nil) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 15 16 17 |
# File 'lib/getfluxly/error.rb', line 10 def initialize(, code:, retryable: false, retry_after_ms: nil, status: nil, details: nil) super() @code = code @retryable = retryable @retry_after_ms = retry_after_ms @status = status @details = details || {} end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/getfluxly/error.rb', line 8 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
8 9 10 |
# File 'lib/getfluxly/error.rb', line 8 def details @details end |
#retry_after_ms ⇒ Object (readonly)
Returns the value of attribute retry_after_ms.
8 9 10 |
# File 'lib/getfluxly/error.rb', line 8 def retry_after_ms @retry_after_ms end |
#retryable ⇒ Object (readonly)
Returns the value of attribute retryable.
8 9 10 |
# File 'lib/getfluxly/error.rb', line 8 def retryable @retryable end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/getfluxly/error.rb', line 8 def status @status end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/getfluxly/error.rb', line 19 def inspect "#<GetFluxly::Error code=#{@code.inspect} retryable=#{@retryable} status=#{@status.inspect}>" end |