{"record":{"id":"397b3b990d50ff43","repo":"hasura/graphql-engine","slug":"ndc-validation-error-0-397b3b","errorCode":null,"errorMessage":"ndc validation error: {0}","messagePattern":"ndc validation error: (.+?)","errorType":"validation","errorClass":"TypeMappingCollectionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/type_mappings.rs","lineNumber":52,"sourceCode":"    },\n    #[error(\n        \"Missing mapping for field {field_name:} when mapping type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}\"\n    )]\n    MissingFieldMapping {\n        type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n        data_connector: Qualified<DataConnectorName>,\n        ndc_type_name: DataConnectorObjectType,\n    },\n\n    #[error(\"Cannot return a predicate type from a command\")]\n    PredicateAsResponseType,\n\n    #[error(\"Internal Error: Unknown type {type_name:} when collecting type mappings\")]\n    InternalUnknownType {\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\"ndc validation error: {0}\")]\n    NDCValidationError(#[from] NDCValidationError),\n}\n\n// Special case handling for commands with response config; as they don't match\n// the ndc type mapping exactly.\n#[derive(Debug)]\npub(crate) struct SpecialCaseTypeMapping<'a> {\n    pub(crate) response_config: &'a CommandsResponseConfig,\n    pub(crate) ndc_object_type: &'a ndc_models::ObjectType,\n}\n\npub(crate) fn collect_type_mapping_for_source(\n    mapping_to_collect: &TypeMappingToCollect,\n    data_connector_name: &Qualified<DataConnectorName>,\n    object_types: &type_permissions::ObjectTypesWithPermissions,\n    scalar_types: &BTreeMap<Qualified<CustomTypeName>, scalar_types::ScalarTypeRepresentation>,\n    collected_mappings: &mut BTreeMap<Qualified<CustomTypeName>, object_types::TypeMapping>,\n    special_case: Option<&SpecialCaseTypeMapping>,","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/type_mappings.rs#L34-L70","documentation":"Wrapper error propagating an inner NDCValidationError out of the type-mapping collection stage via the #[from] conversion. It indicates one of the ndc_validation errors (e.g. missing types, capability problems) occurred while collecting type mappings.","triggerScenarios":"Any NDCValidationError raised inside the type mapping collection code path, such as NoSuchType or QueryCapabilityUnsupported triggered while resolving command response types.","commonSituations":"Any underlying metadata/connector inconsistency surfacing through the type-mappings stage.","solutions":["Inspect the wrapped inner error message to identify the actual NDC validation failure","Fix the underlying cause per that error's guidance (missing type, capability, mapping)","Re-run metadata resolution to confirm the fix"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match err {\n    TypeMappingCollectionError::NDCValidationError(inner) => match inner { /* handle specific variant */ _ => {} },\n    _ => {},\n}","preventionTips":["Log the inner NDCValidationError variant; it carries the actionable cause"],"tags":["ndc","wrapper","type-mapping"],"backgroundTag":"schema-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}