Exception: Anypost::WebhookVerificationError
- Inherits:
-
StandardError
- Object
- StandardError
- Anypost::WebhookVerificationError
- Defined in:
- lib/anypost/webhook_signature.rb
Overview
Raised when a webhook delivery’s signature cannot be verified.
Instance Attribute Summary collapse
-
#reason ⇒ Symbol
readonly
The machine-readable reason.
Instance Method Summary collapse
-
#initialize(message, reason) ⇒ WebhookVerificationError
constructor
A new instance of WebhookVerificationError.
Constructor Details
#initialize(message, reason) ⇒ WebhookVerificationError
Returns a new instance of WebhookVerificationError.
17 18 19 20 |
# File 'lib/anypost/webhook_signature.rb', line 17 def initialize(, reason) super() @reason = reason end |
Instance Attribute Details
#reason ⇒ Symbol (readonly)
The machine-readable reason. Branch on this rather than the message.
One of: :malformed_header, :no_timestamp, :no_signatures, :timestamp_out_of_tolerance, :no_match.
15 16 17 |
# File 'lib/anypost/webhook_signature.rb', line 15 def reason @reason end |