libero/json/error
Types
Values
pub fn prefix(
errors errors: List(JsonError),
segment segment: String,
) -> List(JsonError)
Append a segment to all error paths in the list. Used to contextualize errors from nested decode (e.g. prepend “fields.slug” to errors from decoding a String field).
pub fn to_frame_errors(
errors: List(JsonError),
) -> List(#(String, String))
Convert a list of JSON errors to protocol-neutral path+message tuples
suitable for the shared ServerFrame Error variant.