{"record":{"id":"bc2c175da6d70609","repo":"hasura/graphql-engine","slug":"errors","errorCode":null,"errorMessage":"{errors}","messagePattern":"\\{errors\\}","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/types/error.rs","lineNumber":296,"sourceCode":"        #[from] data_connector_scalar_types::DataConnectorScalarTypesError,\n    ),\n    #[error(\"{0}\")]\n    ArgumentError(#[from] arguments::NamedArgumentError),\n    #[error(\"{0}\")]\n    ModelGraphqlError(#[from] models_graphql::ModelGraphqlError),\n    #[error(\"{warning_as_error}\")]\n    CompatibilityError { warning_as_error: crate::Warning },\n    #[error(\"{0}\")]\n    LifecyclePuginError(#[from] plugins::PluginValidationError),\n\n    #[error(\"{0}\")]\n    ViewError(#[from] views::Error),\n    #[error(\"{0}\")]\n    SqlSchemaAliasError(#[from] sql_schema_aliases::SqlSchemaAliasError),\n    #[error(\"unknown view '{view_name}' in view permissions\")]\n    UnknownView { view_name: Qualified<ViewName> },\n\n    #[error(\"{errors}\")]\n    MultipleErrors {\n        errors: SeparatedBy<WithContext<Error>>,\n    },\n}\n\npub trait ShouldBeAnError {\n    fn should_be_an_error(&self, flags: &flags::OpenDdFlags) -> bool;\n}\n\npub trait ContextualError {\n    fn create_error_context(&self) -> Option<error_context::Context>;\n    fn add_context_if_exists(self) -> WithContext<Self>\n    where\n        Self: Sized,\n    {\n        match self.create_error_context() {\n            Some(context) => WithContext::Contextualised {\n                error: self,","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/types/error.rs#L278-L314","documentation":"Aggregate error emitted by the metadata resolver when more than one error occurs while resolving metadata (e.g. resolving a subgraph with many invalid entries). Instead of failing on the first problem, the resolver collects errors wrapped with their context and reports them together, separated by newlines. It exists so users see all metadata issues in one pass rather than fixing them one at a time.","triggerScenarios":"Building/resolving metadata whose resolution pipeline accumulates several sub-errors (invalid types, commands, relationships, etc.) in one resolve cycle; the resolver wraps each underlying Error with WithContext and joins them into this MultipleErrors variant.","commonSituations":"Running `hasura` metadata build/apply on a subgraph with multiple invalid entries; CI metadata validation surfacing several warnings at once; upgrading Hasura to a version with stricter metadata validation so many previously-ignored issues now collect into one error.","solutions":["Read the full `{errors}` list: each line names a specific metadata problem with its file/context — fix each one individually","Re-run metadata resolve/build after each fix; the list shrinks as you go","Use `hasura metadata resolve` (or the CLI lint/validate command) in CI to catch these before apply","If a single underlying error dominates, fix that first — later errors are often cascading from it"],"exampleFix":"# before: subgraph-metadata.yaml has several bad references\n# (unknown command, invalid relationship, unknown type)\n# after: fix each entry reported in the MultipleErrors list\nrelationships:\n  - name: author\n    source: authors   # now a valid model name\ncommands:\n  - name: myCommand\n    target: myModel   # now a valid model name\n","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Match on the aggregate variant and iterate the collected errors\nmatch result {\n    Err(Error::MultipleErrors { errors }) => {\n        for e in errors.iter() {\n            eprintln!(\"metadata error: {e}\");\n        }\n    }\n    Err(e) => eprintln!(\"metadata error: {e}\"),\n    Ok(_) => {}\n}","preventionTips":["Run metadata resolve/validate in CI before applying","Fix underlying errors incrementally; re-resolve after each fix"],"tags":["metadata","aggregate","hasura","ndc","validation"],"backgroundTag":"metadata-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}