{"record":{"id":"b654d0eb021d0705","repo":"hasura/graphql-engine","slug":"ndc-validation-error-0-b654d0","errorCode":null,"errorMessage":"ndc validation error: {0}","messagePattern":"ndc validation error: (.+?)","errorType":"exception","errorClass":"TypeMappingValidationError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_types/error.rs","lineNumber":139,"sourceCode":"        \"the type {unknown_ndc_type:} is not defined as an object type in the connector's schema. This type is being mapped to by the type {type_name:}\"\n    )]\n    UnknownNdcType {\n        type_name: Qualified<CustomTypeName>,\n        unknown_ndc_type: DataConnectorObjectType,\n    },\n    #[error(\"expected to find a predicate type for argument {argument_name:} but did not\")]\n    PredicateTypeNotFound { argument_name: ArgumentName },\n    #[error(\n        \"the type {unknown_ndc_field_type_name:} is not defined as an object type in the connector's schema. This type is referenced by the field {ndc_field_name:} in the connector's schema type {ndc_type_name:}, which is mapped to the field {field_name:} in the type {type_name:}\"\n    )]\n    UnknownNdcFieldObjectType {\n        type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n        ndc_type_name: String,\n        ndc_field_name: String,\n        unknown_ndc_field_type_name: String,\n    },\n    #[error(\"ndc validation error: {0}\")]\n    NDCValidationError(#[from] NDCValidationError),\n}\n","sourceCodeStart":121,"sourceCodeEnd":142,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_types/error.rs#L121-L142","documentation":"Wrapper error: an NDCValidationError raised while validating the metadata-derived object types against the connector's schema failed to resolve. The inner error (message {0}) carries the actual validation failure detail from the ndc-reference/agent validation layer.","triggerScenarios":"Any mismatch detected when the resolver validates the constructed NDC schema (object types, fields, relationships) against what the data connector reports — for example inconsistent field types, unsupported relationships, or capabilities mismatch.","commonSituations":"Connector and metadata out of sync; using connector features not declared in the connector's capabilities; malformed custom type definitions.","solutions":["Read the wrapped NDCValidationError message — it names the concrete validation failure","Fix the underlying mismatch it reports (usually a type/field/relationship inconsistency between metadata and connector schema)","Re-fetch the connector schema and reapply metadata"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Catch at metadata apply time and surface the inner NDC validation error\ntry {\n  await applyMetadata(md);\n} catch (e) {\n  if (String(e).includes('ndc validation error')) {\n    console.error('NDC validation failed:', e.cause ?? e);\n  }\n  throw e;\n}","preventionTips":["Run NDC schema validation in CI against a live connector before deploying metadata","Keep connector and metadata versions pinned together"],"tags":["hasura","metadata","data-connectors","ndc","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}