PhoenixKitInbox.Errors (PhoenixKitInbox v0.2.0)

Copy Markdown View Source

Central mapping from the error atoms this module's contexts return to translated, user-facing strings.

Contexts return atoms ({:error, :mailbox_access_denied}); LiveViews call message/1 at the flash boundary. Keeping the copy here means every "not found" reads identically across the three LiveViews, and translators have one file to work from.

Example

iex> PhoenixKitInbox.Errors.message(:message_not_found)
"Message not found."

Summary

Functions

Translates an error reason into a user-facing string.

Functions

message(changeset)

@spec message(term()) :: String.t()

Translates an error reason into a user-facing string.