ewebmachine v2.1.3 Ewebmachine.Plug.ErrorAsException exception

This plug checks the current response status. If it is an error, raise a plug exception with the status code and the HTTP error name as the message. If this response body is not void, use it as the exception message.

Summary

Functions

call(conn, _)
exception(msg)
exception(String.t) :: Exception.t
exception(keyword) :: Exception.t

Callback implementation for Exception.exception/1.

init(_)
message(exception)
message(Exception.t) :: String.t

Callback implementation for Exception.message/1.