Exception: Dinie::UnknownWebhookEventError
- Defined in:
- lib/dinie/runtime/errors.rb
Overview
A webhook signature verified, but the payload’s ‘type` is not in the openapi event catalog, so there is no per-type deserializer for it. Raising (rather than passing the raw event through) is deliberate — a new event `type` is a contract change. The unrecognized `type` is preserved on #event_type.
Instance Attribute Summary collapse
-
#event_type ⇒ String
readonly
The unrecognized (but verified) webhook event ‘type`.
Instance Method Summary collapse
-
#initialize(event_type) ⇒ UnknownWebhookEventError
constructor
A new instance of UnknownWebhookEventError.
Constructor Details
#initialize(event_type) ⇒ UnknownWebhookEventError
Returns a new instance of UnknownWebhookEventError.
140 141 142 143 144 145 |
# File 'lib/dinie/runtime/errors.rb', line 140 def initialize(event_type) @event_type = event_type super("Unknown webhook event type: #{event_type.inspect}. It is not in the openapi event " \ "catalog (generated/events). If Dinie added a new event type, the SDK must be updated " \ "from the contract before it can deserialize this payload.") end |
Instance Attribute Details
#event_type ⇒ String (readonly)
Returns the unrecognized (but verified) webhook event ‘type`.
137 138 139 |
# File 'lib/dinie/runtime/errors.rb', line 137 def event_type @event_type end |