Exception: Hooksmith::UnknownEventError

Inherits:
Error
  • Object
show all
Defined in:
lib/hooksmith/errors.rb

Overview

Raised when the event name is not recognized or invalid.

This error can be raised when strict event validation is enabled and an unknown event type is received.

Examples:

raise Hooksmith::UnknownEventError.new('stripe', 'invalid.event.type')

Instance Attribute Summary

Attributes inherited from Error

#event, #provider

Instance Method Summary collapse

Constructor Details

#initialize(provider, event) ⇒ UnknownEventError

Initializes a new UnknownEventError.

Parameters:

  • provider (String, Symbol)

    the provider name

  • event (String, Symbol)

    the event name



165
166
167
168
169
170
171
# File 'lib/hooksmith/errors.rb', line 165

def initialize(provider, event)
  super(
    "Unknown event '#{event}' for provider '#{provider}'",
    provider:,
    event:
  )
end