Exception: EasyPost::Errors::ExternalApiError
- Inherits:
-
EasyPostError
- Object
- StandardError
- EasyPostError
- EasyPost::Errors::ExternalApiError
- Defined in:
- lib/easypost/errors/api/external_api_error.rb
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code = nil) ⇒ ExternalApiError
constructor
A new instance of ExternalApiError.
- #pretty_print ⇒ Object
Constructor Details
#initialize(message, status_code = nil) ⇒ ExternalApiError
Returns a new instance of ExternalApiError.
6 7 8 9 |
# File 'lib/easypost/errors/api/external_api_error.rb', line 6 def initialize(, status_code = nil) super @status_code = status_code end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/easypost/errors/api/external_api_error.rb', line 4 def status_code @status_code end |
Instance Method Details
#pretty_print ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/easypost/errors/api/external_api_error.rb', line 11 def pretty_print if status_code.nil? return end "(#{status_code}): #{}" end |