{"record":{"id":"b626fbabdb9decc3","repo":"SigNoz/signoz","slug":"codenotfound","errorCode":"CodeNotFound","errorMessage":"oidc: no id_token in token response","messagePattern":"oidc: no id_token in token response","errorType":"error_code","errorClass":"errors.Error","httpStatus":404,"severity":"error","filePath":"ee/authn/callbackauthn/oidccallbackauthn/authn.go","lineNumber":218,"sourceCode":"\t}\n\n\treturn oidcProvider, &oauth2.Config{\n\t\tClientID:     oidcConfig.ClientID,\n\t\tClientSecret: oidcConfig.ClientSecret,\n\t\tEndpoint:     oidcProvider.Endpoint(),\n\t\tScopes:       scopes,\n\t\tRedirectURL: (&url.URL{\n\t\t\tScheme: siteURL.Scheme,\n\t\t\tHost:   siteURL.Host,\n\t\t\tPath:   path.Join(a.globalConfig.ExternalPath(), redirectPath),\n\t\t}).String(),\n\t}, nil\n}\n\nfunc (a *AuthN) claimsFromIDToken(ctx context.Context, authDomain *authtypes.AuthDomain, provider *oidc.Provider, token *oauth2.Token) (map[string]any, error) {\n\trawIDToken, ok := token.Extra(\"id_token\").(string)\n\tif !ok {\n\t\treturn nil, errors.New(errors.TypeNotFound, errors.CodeNotFound, \"oidc: no id_token in token response\")\n\t}\n\n\toidcConfig, err := authDomain.Config().OIDCConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tverifier := provider.Verifier(&oidc.Config{ClientID: oidcConfig.ClientID})\n\tidToken, err := verifier.Verify(ctx, rawIDToken)\n\tif err != nil {\n\t\treturn nil, errors.Newf(errors.TypeForbidden, errors.CodeForbidden, \"oidc: failed to verify token\").WithAdditional(err.Error())\n\t}\n\n\tvar claims map[string]any\n\tif err := idToken.Claims(&claims); err != nil {\n\t\treturn nil, errors.Newf(errors.TypeInvalidInput, errors.CodeInvalidInput, \"oidc: failed to decode claims\").WithAdditional(err.Error())\n\t}\n","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/ee/authn/callbackauthn/oidccallbackauthn/authn.go#L200-L236","documentation":"Default branch in reduceQuery (SigNoz metrics v3 query_builder.go). After building the inner series query it applies the requested ReduceToOperator (last, avg, max, min, sum, etc.); if the operator is not one of the recognized ReduceTo values it cannot wrap the inner query and returns this error.","triggerScenarios":"PrepareMetricQuery with a qp having a ReduceTo value outside the handled set — empty string, a misspelled operator like 'latest', or a reduce operator introduced in a different SigNoz version — on a query that requires a reduce stage.","commonSituations":"Building 'current value' / single-datum widgets with an unset or invalid reduce field; version skew between UI and query-service; hand-writing dashboard JSON with a bad reduce value.","solutions":["Set reduceTo to a supported value: last, avg, max, min, sum, count, sum_rate, avg_rate, max_rate, min_rate, or no-op where allowed","Validate/normalize the reduce field in your API layer before calling PrepareMetricQuery","Upgrade frontend and query-service together so both support the same ReduceTo set"],"exampleFix":"// before\nqp.ReduceTo = \"latest\" // unsupported value\n\n// after\nqp.ReduceTo = v3.ReduceToOperatorLast // maps to the lastIf(...) branch","handlingStrategy":"validation","validationCode":"var validReduce = map[v3.ReduceToOperator]bool{v3.ReduceToOperatorLast: true, v3.ReduceToOperatorAvg: true, v3.ReduceToOperatorMax: true, v3.ReduceToOperatorMin: true, v3.ReduceToOperatorSum: true /* ... */}\nif !validReduce[qp.ReduceTo] {\n\tqp.ReduceTo = v3.ReduceToOperatorLast\n}","typeGuard":"null","tryCatchPattern":"if _, err := v3.PrepareMetricQuery(...); err != nil && strings.Contains(err.Error(), \"unsupported reduce operator\") {\n\tqp.ReduceTo = v3.ReduceToOperatorLast\n\treturn v3.PrepareMetricQuery(...)\n}","preventionTips":["Always populate the reduceTo field on single-value widgets","Share one allowlist of reduce operators across UI and API"],"tags":["signoz","metrics","query-builder","reduce-operator","clickhouse"],"backgroundTag":"unsupported-reduce-operator","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}