Exception: KnoxCall::SignupError
- Defined in:
- lib/knoxcall/errors.rb
Overview
KnoxCall.signup failed — validation, slug conflict, rate limit, or an unexpected response body. Carries the server's machine-readable error type (e.g. "slug_taken") and the request id for support.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code:, error_type: nil, request_id: nil, body: nil) ⇒ SignupError
constructor
A new instance of SignupError.
Constructor Details
#initialize(message, status_code:, error_type: nil, request_id: nil, body: nil) ⇒ SignupError
205 206 207 208 209 210 211 |
# File 'lib/knoxcall/errors.rb', line 205 def initialize(, status_code:, error_type: nil, request_id: nil, body: nil) super() @status_code = status_code @error_type = error_type @request_id = request_id @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
203 204 205 |
# File 'lib/knoxcall/errors.rb', line 203 def body @body end |
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
203 204 205 |
# File 'lib/knoxcall/errors.rb', line 203 def error_type @error_type end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
203 204 205 |
# File 'lib/knoxcall/errors.rb', line 203 def request_id @request_id end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
203 204 205 |
# File 'lib/knoxcall/errors.rb', line 203 def status_code @status_code end |