class AgileCRMWrapper::Error

Attributes

response[R]

Public Class Methods

errors() click to toggle source
# File lib/agilecrm-wrapper/error.rb, line 10
def errors
  @errors ||= {
    400 => AgileCRMWrapper::BadRequest,
    401 => AgileCRMWrapper::Unauthorized,
    404 => AgileCRMWrapper::NotFound,
    405 => AgileCRMWrapper::MethodNotAllowed,
    415 => AgileCRMWrapper::MediaTypeMismatch,
    500 => AgileCRMWrapper::InternalServerError
  }
end
from_response(response, message = '') click to toggle source
# File lib/agilecrm-wrapper/error.rb, line 6
def from_response(response, message = '')
  new(response, message)
end
new(response, message = '') click to toggle source
Calls superclass method
# File lib/agilecrm-wrapper/error.rb, line 22
def initialize(response, message = '')
  super(message)
  @response = response
end