Exception: Capsolver::ApiError
- Defined in:
- lib/capsolver/error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_description ⇒ Object
readonly
Returns the value of attribute error_description.
-
#error_id ⇒ Object
readonly
Returns the value of attribute error_id.
Instance Method Summary collapse
-
#initialize(error_id:, error_code:, error_description:) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(error_id:, error_code:, error_description:) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 13 14 |
# File 'lib/capsolver/error.rb', line 9 def initialize(error_id:, error_code:, error_description:) @error_id = error_id @error_code = error_code @error_description = error_description super("[#{error_code}] #{error_description} (Error ID: #{error_id})") end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/capsolver/error.rb', line 7 def error_code @error_code end |
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
7 8 9 |
# File 'lib/capsolver/error.rb', line 7 def error_description @error_description end |
#error_id ⇒ Object (readonly)
Returns the value of attribute error_id.
7 8 9 |
# File 'lib/capsolver/error.rb', line 7 def error_id @error_id end |