Exception: Parse::Webhooks::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Parse::Webhooks::ResponseError
- Defined in:
- lib/parse/webhooks.rb
Overview
The error to be raised in registered trigger or function webhook blocks that will trigger the Parse::Webhooks application to return the proper error response.
An optional numeric code is carried on the exception and written into
the error body as "code". Note that Parse Server's HTTP webhook adapter
(as of 9.10) reports every webhook error to the client as code 141
(SCRIPT_FAILED) and does not forward a custom code; the code remains
visible to in-process callers such as run_function.
Instance Attribute Summary collapse
-
#code ⇒ Integer?
readonly
The Parse error code requested by the handler.
Instance Method Summary collapse
-
#initialize(message = nil, code: nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(message = nil, code: nil) ⇒ ResponseError
Returns a new instance of ResponseError.
98 99 100 101 |
# File 'lib/parse/webhooks.rb', line 98 def initialize( = nil, code: nil) super() @code = code end |
Instance Attribute Details
#code ⇒ Integer? (readonly)
Returns the Parse error code requested by the handler.
94 95 96 |
# File 'lib/parse/webhooks.rb', line 94 def code @code end |