{"record":{"id":"e464cf6ac21af138","repo":"sipeed/picoclaw","slug":"s-syntax-error-at-line-d-column-d-w-n-s","errorCode":null,"errorMessage":"%s syntax error at line %d, column %d: %w\\n%s","messagePattern":"(.+?) syntax error at line (.+?), column (.+?): %w\\\\n(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/diagnostics.go","lineNumber":70,"sourceCode":"\tif preview == \"\" {\n\t\tif summary == \"\" {\n\t\t\treturn prefix\n\t\t}\n\t\treturn prefix + \": \" + summary\n\t}\n\tif summary == \"\" {\n\t\treturn prefix + \"\\n\" + preview\n\t}\n\treturn prefix + \": \" + summary + \"\\n\" + preview\n}\n\nfunc wrapJSONError(data []byte, err error, label string) error {\n\tswitch e := err.(type) {\n\tcase *json.SyntaxError:\n\t\tline, column := lineAndColumnForOffset(data, e.Offset)\n\t\tpreview := diagnosticPreviewForOffset(data, e.Offset)\n\t\tif preview != \"\" {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"%s syntax error at line %d, column %d: %w\\n%s\",\n\t\t\t\tlabel,\n\t\t\t\tline,\n\t\t\t\tcolumn,\n\t\t\t\terr,\n\t\t\t\tpreview,\n\t\t\t)\n\t\t}\n\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,","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/diagnostics.go#L52-L88","documentation":"Error \"%s syntax error at line %d, column %d: %w\\n%s\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/diagnostics.go:70 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":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}