Exception: Hanami::Events::CloudPubsub::Middleware::Stack::InvalidMiddlewareError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/hanami/events/cloud_pubsub/middleware/stack.rb

Overview

Error raised when middleware is not callable

Instance Method Summary collapse

Constructor Details

#initialize(middleware) ⇒ InvalidMiddlewareError

Returns a new instance of InvalidMiddlewareError.



11
12
13
14
15
16
# File 'lib/hanami/events/cloud_pubsub/middleware/stack.rb', line 11

def initialize(middleware)
  super <<~MSG
    Attempted to add middleware which is not callable: #{middleware.inspect}
    Make sure that your middleware responds to the #call method
  MSG
end