Create standard error models for all thema operations #164
Labels
enhancement
New feature or request
invariants
Involves the definition or enforcement of a key system invariant
prio/mid
Medium priority
readiness/minimum
Requisite for achieving a minimum readiness
As a system that deals with validation, error design is an essential part of Thema's UX. We need a clear, consistent model for the errors that Thema will produce, including clear and easily introspected Go error types.
Each major thema operation (validation, translation) needs its own error model. Lineage binding also needs an error model - probably more urgently than either validate or translate, as the lineage binding error model is basically the "lineage typechecker" that enforces all invariants.
Properties for thema's error models should include:
errors.Is
I got started on the mechanics of this in #82 by pulling in github.com/cockroachdb/errors, but ended up deferring it in the interest of actually the overall PR done.
This supersedes #44, as the scope of that issue was really just focused on validate errors - only one of the models we need. Still relevant is the discussion about noisy errors in disjunctions, though.
The text was updated successfully, but these errors were encountered: