Expand description
Structured error codes emitted in the data.code field of every MCP error
response. These are &'static str constants so callers can pattern-match
them programmatically.
Constants§
- AGGREGATOR_
ERROR - Returned when the
query_aggregatetool receives a structurally inconsistent request (empty sources, ATTACH-limit exceeded, inner-without-group-by, etc.) — distinct from per-field validation errors (those useVALIDATION_ERROR) and from raw SQLite failures (those useSTORAGE_ERROR). - ALIAS_
ALREADY_ EXISTS - Returned when
alias_createis called but an alias with the same name already exists in the table’s_aliasesstorage. - ALIAS_
NOT_ FOUND - Returned when a named query alias does not exist in
_aliases. - ALIAS_
PARAMS_ REQUIRED - Returned when
alias_runis called withoutparamsbut the alias has a non-nullparams_schema(i.e. the alias requires parameter injection). - ALIAS_
TEMPLATE_ ERROR - Returned when MiniJinja template rendering fails (syntax error or
missing variable) during
alias_run. - AMBIGUOUS_
ID - Returned when an id prefix matches more than one row and the caller must disambiguate by using a longer prefix or the full UUID.
- BACKUP_
ERROR - Returned when a backup I/O or SQLite backup operation fails.
- BATCH_
ABORTED - Returned when
schema_batchis aborted because one of its ops fails. - CONFIG_
ERROR - Returned when environment-variable or
.envconfiguration is invalid. - IO_
ERROR - Returned when an I/O operation (file open, read) fails.
- MATERIALIZE_
DEST_ INVALID - Returned when the
row_materializedest path is invalid for another reason. - MATERIALIZE_
DEST_ RELATIVE - Returned when the
row_materializedest path is relative (absolute required). - MATERIALIZE_
EMPTY_ RESULT - Returned when the filter in
row_materializematches zero rows. - MATERIALIZE_
FIELD_ UNKNOWN - Returned when a projected field name is not present in the schema.
- MATERIALIZE_
FORMAT_ ERROR - Returned when serialization to the requested format fails during
row_materialize. - MATERIALIZE_
INVALID_ PARAM - Returned when
row_materializeparameters are structurally invalid. - MATERIALIZE_
IO_ ERROR - Returned when a file I/O error occurs during
row_materialize. - MATERIALIZE_
ROW_ NOT_ FOUND - Returned when the specified row id is not found during
row_materialize. - MATERIALIZE_
SHA256_ ERROR - Returned when SHA-256 computation fails during
row_materialize. - NOT_
FOUND - Returned when a requested row does not exist.
- SCHEMA_
ERROR - Returned when
schema.yamlcannot be parsed or is structurally invalid. - SCHEMA_
EXISTS - Returned when a schema file already exists and
schema_createwould overwrite it. - SNAPSHOT_
ERROR - Returned when a snapshot I/O or SQLite snapshot operation fails.
- STORAGE_
ERROR - Returned when a SQLite operation fails.
- TABLE_
NOT_ FOUND - Returned when the requested table is not mounted in the registry.
- TABLE_
REQUIRED - Returned when
tableargument is required but was omitted. - VALIDATION_
ERROR - Returned when a required field is missing or a value has the wrong type.