{"record":{"id":"69a2787da71290e5","repo":"gastownhall/beads","slug":"invalid-started-time-w","errorCode":null,"errorMessage":"invalid started time: %w","messagePattern":"invalid started time: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":409,"sourceCode":"\tcase OpGreater:\n\t\tfilter.ClosedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.ClosedAfter = &t\n\tcase OpLess:\n\t\tfilter.ClosedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.ClosedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"closed does not support %s operator\", comp.Op.String())\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyStartedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tt, err := e.parseTimeValue(comp)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid started time: %w\", err)\n\t}\n\tswitch comp.Op {\n\tcase OpGreater:\n\t\tfilter.StartedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.StartedAfter = &t\n\tcase OpLess:\n\t\tfilter.StartedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.StartedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"started does not support %s operator\", comp.Op.String())\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyIDFilter(comp *ComparisonNode, filter *types.IssueFilter) error {","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L391-L427","documentation":"Thrown when the value in a `started <time>` comparison cannot be parsed as a valid time by parseTimeValue. The evaluator wraps the underlying parse error, so the root cause (bad date format) is included via %w.","triggerScenarios":"A query like `started > not-a-date`, `started >= 2024-13-45`, or using a format the parser does not recognize (e.g. `01/02/2024` if only ISO-like formats are supported).","commonSituations":"Locale-formatted dates in saved queries; typos like `2024-6-1` vs expected zero-padded forms; shell quoting stripping characters from the date string.","solutions":["Fix the time value to a supported format (ISO-style, e.g. 2024-06-01 or 2024-06-01T15:04:05).","Read the wrapped %w cause in the message to see which parse step failed.","Quote the query in your shell so spaces in the datetime are not split."],"exampleFix":"// before\nbd list 'started > June 1st'\n// after\nbd list 'started > 2024-06-01'","handlingStrategy":"validation","validationCode":"func validateStartedValue(v string) error {\n\tif _, err := time.Parse(\"2006-01-02\", v); err != nil {\n\t\tif _, err := time.Parse(time.RFC3339, v); err != nil {\n\t\t\treturn fmt.Errorf(\"started value %q is not a supported time format\", v)\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"res, err := eval.Query(q)\nif err != nil && strings.HasPrefix(err.Error(), \"invalid started time:\") {\n\t// surface the wrapped parse cause to the user\n}","preventionTips":["Always use ISO-style dates (YYYY-MM-DD or RFC3339) in queries.","Validate user-supplied dates with time.Parse before building the query.","Quote queries in shells to avoid value mangling."],"tags":["query-language","time-parsing","validation"],"backgroundTag":"invalid-time-format","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}