class Hanami::Router::NotFoundError

Error raised when a request is made for a missing route.

Raised only when using hanami-router as part of a full Hanami app. When using hanami-router standalone, the behavior for such requests is to return a “Not Found” response.

@api public @since 2.1.0

Attributes

env[R]

@return [Hash] the Rack environment for the request

@api public @since 2.1.0

Public Class Methods

new(env) click to toggle source
Calls superclass method
# File lib/hanami/extensions/router/errors.rb, line 21
def initialize(env)
  @env = env

  message = "No route found for #{env["REQUEST_METHOD"]} #{env["PATH_INFO"]}"
  super(message)
end