hanami / router

Ruby/Rack HTTP router
http://hanamirb.org
MIT License
362 stars 92 forks source link

Ensure to require `hanami/middleware/error` from `hanami/middleware/body_parser/errors` #225

Closed jodosha closed 2 years ago

jodosha commented 2 years ago

From a Hanami app while trying to use Hanami::Middleware::BodyParser

An error occurred while loading spec_helper.
Failure/Error: require "hanami/prepare"

NameError:
  uninitialized constant Hanami::Middleware::Error

        class BodyParsingError < Hanami::Middleware::Error
                                                   ^^^^^^^
  Did you mean?  IOError
                 Errno
# /Users/jodosha/.gem/ruby/3.1.0/gems/hanami-router-2.0.0.beta1/lib/hanami/middleware/body_parser/errors.rb:12:in `<class:BodyParser>'
# ...