Skip to content

Errors and diagnostics

Every failure is a mabat::Error, whose message names the view and the path. A test fails when the crate has a variant that is not listed here.

ErrorRules
mabat::Error::PlanMPA-PLAN-4, MPA-JSON-4
mabat::Error::Query—
mabat::Error::DecodeMPA-VIEW-5
mabat::Error::MissingReferenceMPA-VIEW-8
mabat::Error::NullTagMPA-SUM-4
mabat::Error::UnknownTagMPA-SUM-4
mabat::Error::OtherVariantColumnMPA-SUM-4
mabat::Error::MissingVariantMPA-SUM-4
mabat::Error::ListIndexMPA-VIEW-9
mabat::Error::DuplicateMapKeyMPA-VIEW-9
mabat::Error::CycleMPA-LOAD-12
mabat::Error::UnloadedReferenceMPA-LOAD-14
mabat::Error::GraphRequiredMPA-LOAD-14, MPA-JSON-5
mabat::Error::MixedKeysMPA-LOAD-3
mabat::Error::NotFoundMPA-LOAD-2
mabat::Error::TooManyRowsMPA-LOAD-2
mabat::Error::NestedArgumentsMPA-LOAD-9
mabat::Error::SelectionWithoutJsonMPA-JSON-6
mabat::Error::JsonMPA-JSON-2
mabat::Error::ColumnNotSelectedMPA-LOAD-7, MPA-LOAD-10
mabat::Error::KeysRequiredMPA-OVR-4
mabat::Error::ParamsMPA-LOAD-19, MPA-VIEW-13
mabat::Error::InvalidMPA-OVR-5
mabat::Error::CheckMPA-OVR-5
mabat::Error::NotRegisteredMPA-OVR-1
mabat::Error::WrongBackendMPA-DB-3
mabat::Error::ManifestBackendMPA-OVR-8
mabat::Error::ConnectionMPA-LOAD-11
mabat::Error::WriteMPA-WRITE-2, MPA-WRITE-11, MPA-WRITE-13, MPA-WRITE-14, MPA-WRITE-15, MPA-WRITE-16
mabat::Error::ConflictMPA-WRITE-9

The checks of a registry (check, build, reload) and mabat check report diagnostics, each with a severity, the view, the query, the file and line, and notes.

CodeSeverityMeaning
M0100errorAn override file cannot be read or parsed
M0101errorAn override names no registered view, or no query of its view
M0102errorA query’s columns do not match the view
M0103errorA query does not prepare on the database
M0104errorA query has the wrong parameters
M0105warningA query does not select every optional path
M0201errorA query reads a table that is not in the schema snapshot
M0202errorA query reads a column that is not in the schema snapshot
M0203errorA column has a type the field cannot be decoded from
M0204warningA column is nullable under a field that is not an Option
M0205errorThe columns linking a query to its parent hold different kinds of key
M0206warningA view’s key column is not the primary key of its table
M0207errorA generated key is on a column the database does not generate
M0301errorA view cannot be planned