elixir-maru / maru

Elixir RESTful Framework
https://maru.readme.io
BSD 3-Clause "New" or "Revised" License
1.32k stars 85 forks source link

`rescue_from` blocks are not as documented #18

Closed barisbalic closed 8 years ago

barisbalic commented 8 years ago

Documentation suggests you can write something like this:

rescue_from :all do
  status 500
  "Oh noes."
end

However an exception is raised, expressing that the Cowboy adapter was expecting to receive a plug. In contrast the following works fine.

rescue_from :all do
  conn
  |> send_resp(500, "Oh noes.")
end

Is the documentation out of date? Or is this a bug?

barisbalic commented 8 years ago

I had bumped version and not seen the changes in documentation. Please ignore.