Exception: Calendly::ApiError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Calendly::ApiError
show all
- Defined in:
- lib/calendly/api_error.rb
Overview
Calendly apis client error object.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Loggable
#debug_log, #error_log, #info_log, #warn_log
Constructor Details
#initialize(response, cause_exception, message: nil) ⇒ ApiError
Returns a new instance of ApiError.
20
21
22
23
24
25
26
27
|
# File 'lib/calendly/api_error.rb', line 20
def initialize(response, cause_exception, message: nil)
@response = response
@cause_exception = cause_exception
@message = message
set_attributes_from_response
@message ||= cause_exception.message if cause_exception
super @message
end
|
Instance Attribute Details
#cause_exception ⇒ OAuth2::Error, JSON::ParserError
18
19
20
|
# File 'lib/calendly/api_error.rb', line 18
def cause_exception
@cause_exception
end
|
#response ⇒ Faraday::Response
9
10
11
|
# File 'lib/calendly/api_error.rb', line 9
def response
@response
end
|
#status ⇒ Integer
12
13
14
|
# File 'lib/calendly/api_error.rb', line 12
def status
@status
end
|
#title ⇒ String
15
16
17
|
# File 'lib/calendly/api_error.rb', line 15
def title
@title
end
|
Instance Method Details
#inspect ⇒ Object
29
30
31
|
# File 'lib/calendly/api_error.rb', line 29
def inspect
"\#<#{self.class}:#{object_id} title:#{title}, status:#{status}>"
end
|