Exception: Mindee::HTTP::Error::MindeeHttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Mindee::HTTP::Error::MindeeHttpError
show all
- Defined in:
- lib/mindee/http/error.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(http_error, url, code) ⇒ MindeeHttpError
Returns a new instance of MindeeHttpError.
105
106
107
108
109
110
111
|
# File 'lib/mindee/http/error.rb', line 105
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
96
97
98
|
# File 'lib/mindee/http/error.rb', line 96
def api_code
@api_code
end
|
#api_details ⇒ String
98
99
100
|
# File 'lib/mindee/http/error.rb', line 98
def api_details
@api_details
end
|
#api_message ⇒ String
100
101
102
|
# File 'lib/mindee/http/error.rb', line 100
def api_message
@api_message
end
|
#status_code ⇒ String
94
95
96
|
# File 'lib/mindee/http/error.rb', line 94
def status_code
@status_code
end
|