Typed error returned by Pote APIs that parse or validate structured input (currently theme JSON loading).
Unlike raising functions (parse!/1), the fallible variants
(parse/1, load_json/1) return {:error, %Pote.Error{}} so
callers can pattern-match on kind without string matching.
Fields
kind- atom category of the error (:invalid_theme, ...)message- human-readable explanationdetails- optional extra context (e.g. the offending key)
Examples
iex> {:error, %Pote.Error{kind: :invalid_theme}} = Pote.Theme.parse("{bad json")
true