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
Class Method Summary collapse
-
.error_string ⇒ Object
override error_string to provide your own error_string.
- .extra_string ⇒ Object
Instance Method Summary collapse
-
#initialize(obj:, method:, code:, response:, endpoint:) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(obj:, method:, code:, response:, endpoint:) ⇒ RequestError
Returns a new instance of RequestError.
13 14 15 16 17 18 19 |
# File 'lib/cloud_party/exception.rb', line 13 def initialize(obj:, method:, code:, response:, endpoint:) @obj = obj @method = method @endpoint = endpoint @code = code @response = response end |
Class 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 self.error_string # This method should be overridden end |
.extra_string ⇒ Object
25 26 27 |
# File 'lib/cloud_party/exception.rb', line 25 def self.extra_string # This method should be overridden end |
Instance Method Details
#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 |