Openmaize.Errors

Module to handle errors and redirects.

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

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