Openmaize.Report
This module provides error and info messages and handles redirects if
the option redirects
is set to true.
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 |
terminate(conn) | Return and halt the connection. Also, set the openmaize_skip value to true, which means that subsequent Openmaize plugs will just return the connection without performing any checks |
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.
Return and halt the connection. Also, set the openmaize_skip value to true, which means that subsequent Openmaize plugs will just return the connection without performing any checks.