Exception: Idcf::Cli::Error::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Idcf::Cli::Error::ApiError
- Defined in:
- lib/idcf/cli/error/api_error.rb
Overview
api error
Instance Attribute Summary collapse
-
#responce ⇒ Object
readonly
Returns the value of attribute responce.
Instance Method Summary collapse
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(res) ⇒ ApiError
constructor
A new instance of ApiError.
- #message ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(res) ⇒ ApiError
Returns a new instance of ApiError.
8 9 10 |
# File 'lib/idcf/cli/error/api_error.rb', line 8 def initialize(res) @responce = res end |
Instance Attribute Details
#responce ⇒ Object (readonly)
Returns the value of attribute responce.
6 7 8 |
# File 'lib/idcf/cli/error/api_error.rb', line 6 def responce @responce end |
Instance Method Details
#body ⇒ Object
22 23 24 |
# File 'lib/idcf/cli/error/api_error.rb', line 22 def body responce.body end |
#headers ⇒ Object
26 27 28 |
# File 'lib/idcf/cli/error/api_error.rb', line 26 def headers responce.headers end |
#message ⇒ Object
16 17 18 19 20 |
# File 'lib/idcf/cli/error/api_error.rb', line 16 def msg = super return msg unless msg.empty? responce.body.to_param end |
#status ⇒ Object
12 13 14 |
# File 'lib/idcf/cli/error/api_error.rb', line 12 def status responce.status end |