Canary.ErrorHandler behaviour (canary v2.0.0-dev)
Specifies the behavior for handling errors in Canary.
Summary
Callbacks
Handles the case where a resource is not found.
Handles the case where a resource is not authorized.
Callbacks
@callback not_found_handler(Plug.Conn.t()) :: Plug.Conn.t()
@callback not_found_handler(Phoenix.LiveView.Socket.t()) :: {:halt, Phoenix.LiveView.Socket.t()}
Handles the case where a resource is not found.
@callback unauthorized_handler(Plug.Conn.t()) :: Plug.Conn.t()
@callback unauthorized_handler(Phoenix.LiveView.Socket.t()) :: {:halt, Phoenix.LiveView.Socket.t()}
Handles the case where a resource is not authorized.