LightningWeb.ErrorFormatter (Lightning v2.14.5-pre1)
View SourceFormats structured domain errors into user-friendly, localized messages.
Transforms error tuples from domain operations into displayable strings using Gettext.
Usage
message = ErrorFormatter.format({:reauthorization_required, credential}, context)
Extension
Add new error types by defining additional format/1
clauses and Gettext entries.
See https://hexdocs.pm/gettext/Gettext.html for Gettext documentation.