Openmaize.Report

This module provides error and info messages and handles redirects if the option redirects is set to true.

Source

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 redirects option is set to false

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

handle_error(conn, message)

Redirect the connection to the login page with an error message.

Source
handle_error(conn, role, message)

Redirect the connection to the user’s role’s page with an error message.

Source
handle_info(conn, message)

Redirect the connection to the home page with an info message.

Source
handle_info(conn, role, message)

Redirect the connection to the user’s role’s page with an info message.

Source
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 redirects option is set to false.

Source
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.

Source