{"record":{"id":"e7c802900620fbe1","repo":"jaegertracing/jaeger","slug":"invalid-start-time-w","errorCode":null,"errorMessage":"invalid start_time: %w","messagePattern":"invalid start_time: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/internal/mcptools/internal/handlers/get_dependencies.go","lineNumber":53,"sourceCode":"\t\tqueryService: queryService,\n\t}\n\treturn h.handle\n}\n\nfunc (h *getDependenciesHandler) handle(\n\tctx context.Context,\n\t_ *mcp.CallToolRequest,\n\tinput types.GetDependenciesInput,\n) (*mcp.CallToolResult, types.GetDependenciesOutput, error) {\n\tendTime, err := parseDependencyTime(input.EndTime, time.Now())\n\tif err != nil {\n\t\treturn nil, types.GetDependenciesOutput{}, fmt.Errorf(\"invalid end_time: %w\", err)\n\t}\n\n\tdefaultStart := endTime.Add(-24 * time.Hour)\n\tstartTime, err := parseDependencyTime(input.StartTime, defaultStart)\n\tif err != nil {\n\t\treturn nil, types.GetDependenciesOutput{}, fmt.Errorf(\"invalid start_time: %w\", err)\n\t}\n\n\tif !startTime.Before(endTime) {\n\t\treturn nil, types.GetDependenciesOutput{}, errors.New(\"start_time must be before end_time\")\n\t}\n\n\tlookback := endTime.Sub(startTime)\n\tdeps, err := h.queryService.GetDependencies(ctx, endTime, lookback)\n\tif err != nil {\n\t\treturn nil, types.GetDependenciesOutput{}, fmt.Errorf(\"failed to get dependencies: %w\", err)\n\t}\n\n\tlinks := make([]types.DependencyLink, 0, len(deps))\n\tfor _, d := range deps {\n\t\tlinks = append(links, types.DependencyLink{\n\t\t\tCaller:    d.Parent,\n\t\t\tCallee:    d.Child,\n\t\t\tCallCount: d.CallCount,","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/internal/mcptools/internal/handlers/get_dependencies.go#L35-L71","documentation":"Same parsing path as end_time but for the start_time field of GetDependenciesInput. After end_time is resolved (default time.Now()), start_time defaults to endTime-24h; if an explicit start_time cannot be parsed, the handler wraps the parse error with \"invalid start_time\". It indicates malformed client input, not a backend problem.","triggerScenarios":"Calling get_dependencies with input.StartTime set to an unparseable value such as \"24 hours ago\", \"2026-08-31\" (date only, if unsupported format), or a malformed RFC3339 string; also triggered when start_time's format is rejected even though end_time parsed fine.","commonSituations":"Clients computing lookback windows with relative expressions; constructing timestamps with time formatting differences (millisecond precision with wrong separator); hard-coded dates in tests or dashboards that predate a format change.","solutions":["Pass start_time as an RFC3339 timestamp, e.g. \"2026-08-31T08:00:00Z\".","Omit start_time to use the default 24h lookback before end_time.","Generate the value with time.Time.Format(time.RFC3339) instead of string concatenation.","Inspect the wrapped error for the specific parse failure."],"exampleFix":"// before\ninput.StartTime = \"24 hours ago\"\n// after\ninput.StartTime = time.Now().Add(-24 * time.Hour).Format(time.RFC3339)","handlingStrategy":"validation","validationCode":"func validStartTime(s string) bool {\n\tif s == \"\" { return true } // defaults to endTime-24h\n\t_, err := time.Parse(time.RFC3339, s)\n\treturn err == nil\n}","typeGuard":"func isRFC3339(s string) bool {\n\t_, err := time.Parse(time.RFC3339, s)\n\treturn err == nil\n}","tryCatchPattern":"out, _, err := handler.Handle(ctx, req, input)\nif err != nil && strings.HasPrefix(err.Error(), \"invalid start_time\") {\n\tinput.StartTime = time.Now().Add(-24 * time.Hour).UTC().Format(time.RFC3339)\n\tout, _, err = handler.Handle(ctx, req, input)\n}","preventionTips":["Build start times from time.Time arithmetic, not string templates.","Omit start_time to accept the default 24h lookback.","Keep timezone explicit: use trailing 'Z' or +/-hh:mm.","Unit-test your timestamp formatting once and reuse the helper."],"tags":["mcp","validation","timestamp","jaeger"],"backgroundTag":"invalid-timestamp-format","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}