Exception: Mindee::Errors::MindeeHTTPError
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(http_error, url, code) ⇒ MindeeHTTPError
Returns a new instance of MindeeHTTPError.
21
22
23
24
25
26
27
|
# File 'lib/mindee/errors/mindee_http_error.rb', line 21
def initialize(http_error, url, code)
@status_code = code
@api_code = http_error['code']
@api_details = http_error['details']
@api_message = http_error['message']
super("#{url} #{@status_code} HTTP error: #{@api_details} - #{@api_message}")
end
|
Instance Attribute Details
#api_code ⇒ Integer
12
13
14
|
# File 'lib/mindee/errors/mindee_http_error.rb', line 12
def api_code
@api_code
end
|
#api_details ⇒ String
14
15
16
|
# File 'lib/mindee/errors/mindee_http_error.rb', line 14
def api_details
@api_details
end
|
#api_message ⇒ String
16
17
18
|
# File 'lib/mindee/errors/mindee_http_error.rb', line 16
def api_message
@api_message
end
|
#status_code ⇒ String
10
11
12
|
# File 'lib/mindee/errors/mindee_http_error.rb', line 10
def status_code
@status_code
end
|