Exception: WebPipe::ConnSupport::MissingMiddlewareError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/web_pipe/conn_support/errors.rb

Overview

Error raised when trying to use a WebPipe::Conn feature which requires a rack middleware that is not present

Instance Method Summary collapse

Constructor Details

#initialize(feature, middleware, gem) ⇒ MissingMiddlewareError

Returns a new instance of MissingMiddlewareError.

Parameters:

  • feature (String)

    Name of the feature intended to be used

  • middleware (String)

    Name of the missing middleware

  • gem (String)

    Gem name for the middleware



37
38
39
40
41
42
43
44
# File 'lib/web_pipe/conn_support/errors.rb', line 37

def initialize(feature, middleware, gem)
  super(
    <<~MSG
      In order to use #{feature} you must use #{middleware} middleware:
      https://rubygems.org/gems/#{gem}
    MSG
  )
end