Openmaize.Errors
Module to handle errors and redirects.
Summary↑
handle_error(conn, message) | Redirect the connection to the login page with an error message |
handle_error(conn, role, message) | Redirect the connection to the user’s role’s page with an error message |
handle_info(conn, message) | Redirect the connection to the home page with an info message |
handle_info(conn, role, message) | Redirect the connection to the user’s role’s page with an info message |
send_error(conn, status, message) | Send a json-encoded error message as a response and then halt the connection.
This function will be used if the |
Functions
Redirect the connection to the login page with an error message.
Redirect the connection to the user’s role’s page with an error message.
Redirect the connection to the home page with an info message.
Redirect the connection to the user’s role’s page with an info message.
Send a json-encoded error message as a response and then halt the connection.
This function will be used if the redirects
option is set to false.