Exception: Wfirma::ApiError
- Defined in:
- lib/wfirma/errors.rb
Overview
A wFirma status code that aborts the request, and the answer a binary action (invoices/download) gives when it returns a JSON error instead of the file. Record-level outcomes flow into Result instead - see Status.
Direct Known Subclasses
AccessDeniedError, AuthError, RateLimitError, RequestError, ServerError, ServiceUnavailableError
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code: nil, errors: []) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status_code: nil, errors: []) ⇒ ApiError
Returns a new instance of ApiError.
13 14 15 16 17 |
# File 'lib/wfirma/errors.rb', line 13 def initialize(, status_code: nil, errors: []) super() @status_code = status_code @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
11 12 13 |
# File 'lib/wfirma/errors.rb', line 11 def errors @errors end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
11 12 13 |
# File 'lib/wfirma/errors.rb', line 11 def status_code @status_code end |