{"record":{"id":"259dfee4f01d23d9","repo":"sipeed/picoclaw","slug":"s-type-error-at-line-d-column-d-expected-s-b","errorCode":null,"errorMessage":"%s type error at line %d, column %d: expected %s but got %s\\n%s","messagePattern":"(.+?) type error at line (.+?), column (.+?): expected (.+?) but got (.+?)\\\\n(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/diagnostics.go","lineNumber":108,"sourceCode":"\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,\n\t\t\t)\n\t\t}\n\t\treturn fmt.Errorf(\n\t\t\t\"%s type error at line %d, column %d: expected %s but got %s\",\n\t\t\tlabel,\n\t\t\tline,\n\t\t\tcolumn,\n\t\t\te.Type.String(),\n\t\t\te.Value,\n\t\t)\n\tdefault:","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/diagnostics.go#L90-L126","documentation":"wrapJSONError's type-error branch when the field name is empty but a preview exists: JSON at the reported position has a value of the wrong type for the target struct and the decoder could not attribute it to a named field. Includes line/column, expected vs actual type, and a source preview.","triggerScenarios":"Thrown at pkg/config/diagnostics.go:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the shown preview and fix the value's type at the reported line/column","Compare the surrounding JSON block against the documented schema","Validate the whole file with a schema-aware linter"],"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"}