Exception: Pipedrive::PipedriveError
- Inherits:
-
StandardError
- Object
- StandardError
- Pipedrive::PipedriveError
- Defined in:
- lib/pipedrive/errors.rb
Direct Known Subclasses
AuthenticationError, BadRequestError, ForbiddenError, GoneError, InternalServerError, MethodNotAllowedError, NotFoundError, NotImplementedError, PaymentRequiredError, ServiceUnavailableError, SettingError, TooManyRequestsError, UnauthorizedError, UnkownAPIError, UnprocessableEntityError, UnsupportedMediaTypeError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(message = nil, code = nil, data = nil) ⇒ PipedriveError
constructor
A new instance of PipedriveError.
- #message ⇒ Object
Constructor Details
#initialize(message = nil, code = nil, data = nil) ⇒ PipedriveError
Returns a new instance of PipedriveError.
7 8 9 10 11 12 |
# File 'lib/pipedrive/errors.rb', line 7 def initialize( = nil, code = nil, data = nil) super() @message = @code = code @data = data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/pipedrive/errors.rb', line 5 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/pipedrive/errors.rb', line 5 def data @data end |
Instance Method Details
#message ⇒ Object
14 15 16 17 |
# File 'lib/pipedrive/errors.rb', line 14 def code_str = @code.nil? ? "" : "(Status #{@code}) " "#{code_str}#{@message}" end |