{"record":{"id":"a46ece3563562573","repo":"sipeed/picoclaw","slug":"s-type-error-at-line-d-column-d-for-field-q-a46ece","errorCode":null,"errorMessage":"%s type error at line %d, column %d for field %q: expected %s but got %s","messagePattern":"(.+?) type error at line (.+?), column (.+?) for field %q: expected (.+?) but got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/diagnostics.go","lineNumber":97,"sourceCode":"\t\treturn fmt.Errorf(\"%s syntax error at line %d, column %d: %w\", label, line, column, err)\n\tcase *json.UnmarshalTypeError:\n\t\tline, column := lineAndColumnForOffset(data, e.Offset)\n\t\tpreview := diagnosticPreviewForOffset(data, e.Offset)\n\t\tfield := strings.TrimSpace(e.Field)\n\t\tif field != \"\" {\n\t\t\tif preview != \"\" {\n\t\t\t\treturn fmt.Errorf(\n\t\t\t\t\t\"%s type error at line %d, column %d for field %q: expected %s but got %s\\n%s\",\n\t\t\t\t\tlabel,\n\t\t\t\t\tline,\n\t\t\t\t\tcolumn,\n\t\t\t\t\tfield,\n\t\t\t\t\te.Type.String(),\n\t\t\t\t\te.Value,\n\t\t\t\t\tpreview,\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"%s type error at line %d, column %d for field %q: expected %s but got %s\",\n\t\t\t\tlabel,\n\t\t\t\tline,\n\t\t\t\tcolumn,\n\t\t\t\tfield,\n\t\t\t\te.Type.String(),\n\t\t\t\te.Value,\n\t\t\t)\n\t\t}\n\t\tif preview != \"\" {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"%s type error at line %d, column %d: expected %s but got %s\\n%s\",\n\t\t\t\tlabel,\n\t\t\t\tline,\n\t\t\t\tcolumn,\n\t\t\t\te.Type.String(),\n\t\t\t\te.Value,\n\t\t\t\tpreview,","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/diagnostics.go#L79-L115","documentation":"wrapJSONError's json.UnmarshalTypeError variant without preview text: the config value for the named field has the wrong JSON type for the target struct. Reports line, column, field name, expected type, and the offending value.","triggerScenarios":"Thrown at pkg/config/diagnostics.go:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the field's type in config.json to match the expected type in the message","Consult the config schema for valid value shapes","Use the web UI config editor to avoid manual type mistakes"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}