Maru v0.12.0 Maru.Exceptions.MethodNotAllowed exception View Source

Raised when request path matched but method not matched. Catch this exception and return 405 like this:

rescue_from Maru.Exceptions.MethodNotAllowed do
  conn
  |> put_status(405)
  |> text("Method Not Allowed")
end

Link to this section Summary

Functions

Callback implementation for Exception.exception/1

Callback implementation for Exception.message/1

Link to this section Functions

Link to this function exception(args) View Source
exception(keyword) :: Exception.t

Callback implementation for Exception.exception/1.

Callback implementation for Exception.message/1.