Fresco.Canvas.SchemaError exception (fresco v0.5.6)

Copy Markdown View Source

Raised (or returned) when a .fresco JSON payload doesn't conform to the schema.

:path points at the offending field (a list of atoms / indices like [:images, 2, :width]). :reason is a structured term explaining what failed (e.g. {:expected_positive_number, -3}, {:duplicate_id, "img-1"}, :missing). Callers can pattern-match on :reason to surface useful user-facing messages.