annon_api v0.16.2 Annon.Helpers.Response

This is a helper module for dispatching requests.

It’s used by Annon.ManagementAPI.Render helpers and places where we want to return an error.

Link to this section Summary

Link to this section Functions

Link to this function build_upstream_error(reason)

Halt the connection.

Delegates to a Plug.Conn.halt/1 function.

Link to this function send(conn, atom)
Link to this function send(resource, conn, status)

Send request to a API consumer.

You may need to halt connection after calling it, if you want to stop rest of plugins from processing rests.

Link to this function send_error(conn, arg2)

Send error by a EView.ErrorView template to a API consumer and halt connection.

Link to this function send_error(conn, atom, root_object_name)
Link to this function send_validation_error(conn, changeset)