Exception: Ilovepdf::ApiError
- Defined in:
- lib/ilovepdf/errors.rb
Direct Known Subclasses
Errors::AuthError, Errors::DownloadError, Errors::ProcessError, Errors::StartError, Errors::UploadError
Instance Attribute Summary collapse
-
#http_response ⇒ Object
Returns the value of attribute http_response.
Instance Method Summary collapse
-
#initialize(http_response, custom_msg: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(http_response, custom_msg: nil) ⇒ ApiError
Returns a new instance of ApiError.
8 9 10 11 12 |
# File 'lib/ilovepdf/errors.rb', line 8 def initialize(http_response, custom_msg: nil) msg_to_use = custom_msg ? custom_msg : extract_error_text(http_response) super(msg_to_use) self.http_response = http_response end |
Instance Attribute Details
#http_response ⇒ Object
Returns the value of attribute http_response.
7 8 9 |
# File 'lib/ilovepdf/errors.rb', line 7 def http_response @http_response end |