Exception: CloudParty::Errors::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- CloudParty::Errors::RequestError
- Defined in:
- lib/cloud_party/exception.rb
Direct Known Subclasses
BadRequestError, ForbiddenError, MethodNotAllowedError, NotFoundError, TooManyRequestsError, UnauthorizedError, UnknownError, UnsupportedMediaTypeError
Instance Method Summary collapse
-
#error_string ⇒ Object
override error_string to provide your own error_string.
- #extra_string ⇒ Object
-
#initialize(message, method, endpoint, code, body) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, method, endpoint, code, body) ⇒ RequestError
Returns a new instance of RequestError.
13 14 15 16 17 18 19 |
# File 'lib/cloud_party/exception.rb', line 13 def initialize(, method, endpoint, code, body) super() @method = method @endpoint = endpoint @code = code @body = body end |
Instance Method Details
#error_string ⇒ Object
override error_string to provide your own error_string
30 31 32 |
# File 'lib/cloud_party/exception.rb', line 30 def error_string # This method should be overridden end |
#extra_string ⇒ Object
25 26 27 |
# File 'lib/cloud_party/exception.rb', line 25 def extra_string # This method should be overridden end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/cloud_party/exception.rb', line 21 def to_s [error_string.squish, extra_string].join("\n") end |