{"record":{"id":"ec411d4228458ef0","repo":"jaegertracing/jaeger","slug":"s-and-s-are-required","errorCode":null,"errorMessage":"%s and %s are required","messagePattern":"(.+?) and (.+?) are required","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/internal/apiv3/query_parser.go","lineNumber":103,"sourceCode":"\t\tqueryParams.Attributes = jptrace.PlainMapToPcommonMap(attrsMap)\n\t}\n\t// The filter parameter carries a JSON-encoded expression.\n\tif filterParam := q.Get(paramFilter); filterParam != \"\" {\n\t\tvar call expressionproto.Call\n\t\tif err := jsonpb.Unmarshal(strings.NewReader(filterParam), &call); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"malformed parameter %s: %w\", paramFilter, err)\n\t\t}\n\t\tfilter, err := expressionproto.FromProto(&call)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"malformed parameter %s: %w\", paramFilter, err)\n\t\t}\n\t\tqueryParams.Filter = filter\n\t}\n\n\ttimeMinStr, timeMinParam := getQueryParam(q, paramTimeMin, paramTimeMinDeprecated)\n\ttimeMaxStr, timeMaxParam := getQueryParam(q, paramTimeMax, paramTimeMaxDeprecated)\n\tif timeMinStr == \"\" || timeMaxStr == \"\" {\n\t\treturn nil, fmt.Errorf(\"%s and %s are required\", paramTimeMin, paramTimeMax)\n\t}\n\ttimeMinParsed, err := time.Parse(time.RFC3339Nano, timeMinStr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"malformed parameter %s: %w\", timeMinParam, err)\n\t}\n\ttimeMaxParsed, err := time.Parse(time.RFC3339Nano, timeMaxStr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"malformed parameter %s: %w\", timeMaxParam, err)\n\t}\n\tif !timeMinParsed.Before(timeMaxParsed) {\n\t\treturn nil, fmt.Errorf(\"%s must be before %s\", paramTimeMin, paramTimeMax)\n\t}\n\tqueryParams.StartTimeMin = timeMinParsed\n\tqueryParams.StartTimeMax = timeMaxParsed\n\n\tn, searchDepthParam := getQueryParam(q, paramSearchDepth, paramSearchDepthDeprecated)\n\tif n == \"\" {\n\t\tn = q.Get(paramNumTraces)","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/internal/apiv3/query_parser.go#L85-L121","documentation":"parseFindTracesQuery requires both `query.startTimeMin` and `query.startTimeMax` (RFC3339Nano bounds on trace start time). If either is absent (or empty), the request is rejected with this message naming both canonical parameter names.","triggerScenarios":"GET /api/v3/traces or /api/v3/traces/summaries without query.startTimeMin, without query.startTimeMax, or supplying only one of the two; also when supplying only deprecated snake_case aliases that are empty strings.","commonSituations":"Clients assuming time range is optional as in older Jaeger APIs; query builders omitting empty time bounds; migrations from snake_case params where the canonical camelCase params were never sent.","solutions":["Add both query.startTimeMin and query.startTimeMax as RFC3339Nano timestamps (e.g. 2026-01-01T00:00:00Z).","If using the deprecated aliases (query.start_time_min/query.start_time_max), they are accepted, but must both be non-empty.","If your client omits empty params, default them to a sensible window (e.g. last 24h)."],"exampleFix":"// before\nGET /api/v3/traces?query.serviceName=foo\n// after\nGET /api/v3/traces?query.serviceName=foo&query.startTimeMin=2026-01-01T00:00:00Z&query.startTimeMax=2026-01-02T00:00:00Z","handlingStrategy":"validation","validationCode":"func ensureTimeRange(params url.Values) error {\n\tif params.Get(\"query.startTimeMin\") == \"\" || params.Get(\"query.startTimeMax\") == \"\" {\n\t\treturn errors.New(\"query.startTimeMin and query.startTimeMax are required\")\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"if resp.StatusCode == 400 {\n\treturn fmt.Errorf(\"time range required: %s\", mustRead(resp.Body))\n}","preventionTips":["Always set both bounds in your query builder; default to a rolling window (now-24h .. now).","Never send empty-string time params; omit them only if you provide the other bound too - actually both are required, so always provide both.","Add a client-side unit test asserting the required params are present."],"tags":["http","query-params","validation","api-v3"],"backgroundTag":"missing-required-argument","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}