Trot.NotFound

Plug for inserting a 404 not found response.

Use this module or plug it in at the end of the plug system. If the connection has not been sent yet, it will be set to 404 with a not found message.

Example

defmodule WhereIsIt.Router do

use Trot.Router

get "/real", do: :ok

use Trot.NotFound

end

Source

Summary

match(conn, opts)

When using import_routes, match/2 is used as the Plug function. Simply passes on to not_found/2

not_found(conn)

See not_found/2

not_found(conn, opts)

Takes a Plug.Conn and sends a “not found” message to the requestor

Functions

match(conn, opts)

When using import_routes, match/2 is used as the Plug function. Simply passes on to not_found/2.

Source
not_found(conn)

See not_found/2.

Source
not_found(conn, opts)

Takes a Plug.Conn and sends a “not found” message to the requestor.

Source