Exception: Rublox::Errors::UnhandledStatusCodeError
- Inherits:
-
StandardError
- Object
- StandardError
- Rublox::Errors::UnhandledStatusCodeError
- Defined in:
- lib/rublox/util/errors.rb
Overview
Exception raised when an unhandled status code is returned.
Instance Attribute Summary collapse
-
#errors ⇒ String
readonly
A string containing all the errors returned by the API neatly formatted.
-
#status_code ⇒ HTTP::Response::Status
readonly
The unhandled status code.
Instance Method Summary collapse
-
#initialize(status_code, errors = "") ⇒ UnhandledStatusCodeError
constructor
A new instance of UnhandledStatusCodeError.
Constructor Details
#initialize(status_code, errors = "") ⇒ UnhandledStatusCodeError
Returns a new instance of UnhandledStatusCodeError.
95 96 97 98 99 |
# File 'lib/rublox/util/errors.rb', line 95 def initialize(status_code, errors = "") super("Unhandled status code #{status_code}.\nRoblox errors:\n#{errors}") @status_code = status_code @errors = errors end |
Instance Attribute Details
#errors ⇒ String (readonly)
Returns a string containing all the errors returned by the API neatly formatted.
91 92 93 |
# File 'lib/rublox/util/errors.rb', line 91 def errors @errors end |
#status_code ⇒ HTTP::Response::Status (readonly)
Returns the unhandled status code.
87 88 89 |
# File 'lib/rublox/util/errors.rb', line 87 def status_code @status_code end |