Exception: ParseAPI::Error
- Inherits:
-
StandardError
- Object
- StandardError
- ParseAPI::Error
- Defined in:
- lib/parseapi/client.rb
Overview
Every non-2xx response from the API. Branch on code, never on the message.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#docs ⇒ Object
readonly
Returns the value of attribute docs.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, code:, message:, docs: nil, request_id: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(status:, code:, message:, docs: nil, request_id: nil) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 15 16 |
# File 'lib/parseapi/client.rb', line 10 def initialize(status:, code:, message:, docs: nil, request_id: nil) super() @status = status @code = code @docs = docs @request_id = request_id end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/parseapi/client.rb', line 8 def code @code end |
#docs ⇒ Object (readonly)
Returns the value of attribute docs.
8 9 10 |
# File 'lib/parseapi/client.rb', line 8 def docs @docs end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
8 9 10 |
# File 'lib/parseapi/client.rb', line 8 def request_id @request_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/parseapi/client.rb', line 8 def status @status end |