ewebmachine v2.2.0 Ewebmachine.Plug.ErrorAsException exception View Source

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.

Link to this section Summary

Link to this section Functions

Link to this function exception(msg) View Source
exception(Keyword.t()) :: Exception.t()
exception(String.t()) :: Exception.t()

Callback implementation for Exception.exception/1.

Callback implementation for Exception.message/1.