{"record":{"id":"4bda810f011c2389","repo":"weaviate/weaviate","slug":"ask-invalid-parameter-4bda81","errorCode":null,"errorMessage":"'ask' invalid parameter","messagePattern":"'ask' invalid parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/qna-transformers/ask/param.go","lineNumber":43,"sourceCode":"\tRerank       bool\n}\n\nfunc (n AskParams) GetCertainty() float64 {\n\treturn n.Certainty\n}\n\nfunc (n AskParams) GetDistance() float64 {\n\treturn n.Distance\n}\n\nfunc (n AskParams) SimilarityMetricProvided() bool {\n\treturn n.Certainty != 0 || n.WithDistance\n}\n\nfunc (g *GraphQLArgumentsProvider) validateAskFn(param interface{}) error {\n\task, ok := param.(*AskParams)\n\tif !ok {\n\t\treturn errors.New(\"'ask' invalid parameter\")\n\t}\n\n\tif len(ask.Question) == 0 {\n\t\treturn errors.Errorf(\"'ask.question' needs to be defined\")\n\t}\n\n\tif ask.Certainty != 0 && ask.WithDistance {\n\t\treturn errors.Errorf(\n\t\t\t\"nearText cannot provide both distance and certainty\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":25,"sourceCodeEnd":57,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/qna-transformers/ask/param.go#L25-L57","documentation":"validateAskFn in the ask GraphQL argument provider first asserts the param is *AskParams, then checks the question. The type assertion failure returns ''ask' invalid parameter'. Like error 350 it signals the GraphQL argument was not deserialized into the expected struct — a wiring/registration problem rather than user error.","triggerScenarios":"The `ask` GraphQL argument reached the validator as a type other than *AskParams, typically due to module/core version mismatch, custom registration of the argument provider, or an internal bug in argument extraction.","commonSituations":"Version-skewed deployments of weaviate core and qna-transformers; patched module registries; running a custom module build against stock core.","solutions":["Deploy core and qna-transformers from the same release","Re-register/rebuild the module so the ask argument provider produces *AskParams","Verify the query goes through the standard GraphQL ask argument (not a custom extension)","If reproducible on matching versions, report as a bug with the query and versions"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// ensure both containers report the same version\n// GET /v1/meta -> version and modules list must match expectations","typeGuard":"func isAskParams(p interface{}) bool {\n    _, ok := p.(*AskParams)\n    return ok\n}","tryCatchPattern":"if err := validateAskFn(param); err != nil {\n    if err.Error() == \"'ask' invalid parameter\" {\n        // argument deserialization mismatch: rebuild/redeploy module with core\n    }\n    return err\n}","preventionTips":["Deploy core + qna-transformers from identical releases","Don't override or wrap the ask argument provider","Run /v1/meta checks in CI after upgrades","Report reproducible cases with query + versions as bugs"],"tags":["go","graphql","type-assertion","ask-argument"],"backgroundTag":"module-param-type-mismatch","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}