Threadline.NotFoundError exception (Threadline v1.0.0)

Copy Markdown View Source

Threadline.NotFoundError is raised by the ! sibling of a single-subject lookup when the subject does not exist or is not visible under the caller's scope.

The message carries only the id the caller passed in — never row data, scope terms, or wording that distinguishes an existing-but-scope-filtered row from a genuinely missing one. resource names the subject looked up: :audit_transaction for Threadline.audit_transaction!/2 and the other single-subject transaction lookups' ! siblings.

Implements Plug.Exception (status/1 returns 404, actions/1 returns []). Unlike Ecto.NoResultsError, which gets its 404 mapping from phoenix_ecto, Threadline depends on :plug directly (mix.exs), so it owns its own status.

Summary

Types

t()

A missing audit transaction identified by its caller-supplied UUID.

Types

t()

(since 1.0.0)
@type t() :: %Threadline.NotFoundError{
  __exception__: true,
  id: Ecto.UUID.t(),
  resource: :audit_transaction
}

A missing audit transaction identified by its caller-supplied UUID.