{"record":{"id":"b2603259341e6d60","repo":"vxcontrol/pentagi","slug":"invalid-strings-value-expected-a-json-array-of-st-b26032","errorCode":null,"errorMessage":"invalid strings value: expected a JSON array of strings, e.g. [\"question 1\",\"question 2\"], got: %s","messagePattern":"invalid strings value: expected a JSON array of strings, e\\.g\\. \\[\"question 1\",\"question 2\"\\], got: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/args.go","lineNumber":539,"sourceCode":"\n\t// Recovery path: the array was sent as a JSON string. Try to decode its\n\t// content as a JSON array of strings first (the double-encoding case seen\n\t// in production), then fall back to treating the whole string as a single\n\t// element so one plain question doesn't fail either.\n\tvar encoded string\n\tif err := json.Unmarshal(data, &encoded); err == nil {\n\t\tvar nested []string\n\t\tif err := json.Unmarshal([]byte(encoded), &nested); err == nil {\n\t\t\t*s = nested\n\t\t\treturn nil\n\t\t}\n\t\tif trimmed := strings.TrimSpace(encoded); trimmed != \"\" {\n\t\t\t*s = []string{trimmed}\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn fmt.Errorf(\n\t\t\"invalid strings value: expected a JSON array of strings, e.g. [\\\"question 1\\\",\\\"question 2\\\"], got: %s\",\n\t\tstrings.TrimSpace(string(data)),\n\t)\n}\n\nfunc (s *Strings) MarshalJSON() ([]byte, error) {\n\tif s == nil || *s == nil {\n\t\treturn []byte(\"[]\"), nil\n\t}\n\treturn json.Marshal([]string(*s))\n}\n","sourceCodeStart":521,"sourceCodeEnd":551,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/args.go#L521-L551","documentation":"Error \"invalid strings value: expected a JSON array of strings, e.g. [\"question 1\",\"question 2\"], got: %s\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/tools/args.go:539 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}