{"record":{"id":"ba096f630a28676f","repo":"SigNoz/signoz","slug":"codelicenseunavailable","errorCode":"CodeLicenseUnavailable","errorMessage":"a valid license is not available","messagePattern":"a valid license is not available","errorType":"error_code","errorClass":"errors.Error","httpStatus":null,"severity":"error","filePath":"ee/authn/callbackauthn/oidccallbackauthn/authn.go","lineNumber":81,"sourceCode":"\nfunc (a *AuthN) HandleCallback(ctx context.Context, query url.Values) (*authtypes.CallbackIdentity, error) {\n\tif err := query.Get(\"error\"); err != \"\" {\n\t\treturn nil, errors.Newf(errors.TypeInternal, errors.CodeInternal, \"oidc: error while authenticating\").WithAdditional(query.Get(\"error_description\"))\n\t}\n\n\tstate, err := authtypes.NewStateFromString(query.Get(\"state\"))\n\tif err != nil {\n\t\treturn nil, errors.Newf(errors.TypeInvalidInput, authtypes.ErrCodeInvalidState, \"oidc: invalid state\").WithAdditional(err.Error())\n\t}\n\n\tauthDomain, err := a.store.GetAuthDomainFromID(ctx, state.DomainID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t_, err = a.licensing.GetActive(ctx, authDomain.StorableAuthDomain().OrgID)\n\tif err != nil {\n\t\treturn nil, errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, \"a valid license is not available\").WithAdditional(\"this feature requires a valid license\").WithAdditional(err.Error())\n\t}\n\n\toidcConfig, err := authDomain.Config().OIDCConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\toidcProvider, oauth2Config, err := a.oidcProviderAndoauth2Config(ctx, state.URL, authDomain)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx = context.WithValue(ctx, oauth2.HTTPClient, a.httpClient.Client())\n\ttoken, err := oauth2Config.Exchange(ctx, query.Get(\"code\"))\n\tif err != nil {\n\t\tvar retrieveError *oauth2.RetrieveError\n\t\tif errors.As(err, &retrieveError) {\n\t\t\treturn nil, errors.Newf(errors.TypeForbidden, errors.CodeForbidden, \"oidc: failed to get token\").WithAdditional(retrieveError.ErrorDescription).WithAdditional(string(retrieveError.Body))","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/ee/authn/callbackauthn/oidccallbackauthn/authn.go#L63-L99","documentation":"Thrown by buildDeltaMetricQueryForTable in SigNoz's metrics v3 query builder when a PromQL/ClickHouse metric query destined for a table (non-time-series) view uses AggregateOperatorRate. The builder's switch on mq.AggregateOperator has no meaningful table-view equivalent for a raw 'rate' aggregation (a TODO in the source acknowledges the open question), so it refuses to build the SQL.","triggerScenarios":"Calling PrepareMetricQuery (directly or via the /api/v1/query_range or dashboard APIs) with a v3.QueryBuildPacket whose AggregateAttribute/AggregateOperator is v3.AggregateOperatorRate while the requested output format is a table view (e.g. panel type 'table' or 'list'), causing the delta table builder path to be selected.","commonSituations":"Switching a SigNoz dashboard panel from graph to table while it uses a rate() aggregation; copying a widget config from a graph panel to a table widget; programmatically generating panels from templates that default to rate for counter metrics.","solutions":["Change the aggregate operator to a table-supported variant such as sum_rate, avg_rate, min_rate or max_rate, which the builder converts to op(value)/step","If you need rate semantics, keep the panel as a time-series (graph) view instead of table","If table+rate must be supported, patch delta_table.go to map rate to one of the *_RATE branches and upstream the change (note the source TODO)"],"exampleFix":"// before\nqb := v3.AggregateOperatorRate\nquery, err := metrics_v3.PrepareMetricQuery(ctx, ... qb, v3.FormatTable ...)\n\n// after\nqb := v3.AggregateOperatorSumRate // table view supports the explicit *_RATE ops\nquery, err := metrics_v3.PrepareMetricQuery(ctx, ... qb, v3.FormatTable ...)","handlingStrategy":"validation","validationCode":"func isTableSupportedOp(op v3.AggregateOperator) bool {\n\tswitch op {\n\tcase v3.AggregateOperatorSumRate, v3.AggregateOperatorAvgRate,\n\t\tv3.AggregateOperatorMaxRate, v3.AggregateOperatorMinRate,\n\t\tv3.AggregateOperatorSum, v3.AggregateOperatorAvg,\n\t\tv3.AggregateOperatorMin, v3.AggregateOperatorMax,\n\t\tv3.AggregateOperatorCount, v3.AggregateOperatorCountDistinct:\n\t\treturn true\n\t}\n\treturn false\n}\n\nif format == v3.FormatTable && !isTableSupportedOp(qp.AggregateOperator) {\n\treturn fmt.Errorf(\"operator %q unsupported in table view; use a *_rate operator\", qp.AggregateOperator)\n}","typeGuard":"null","tryCatchPattern":"if _, err := v3.PrepareMetricQuery(...); err != nil {\n\tif strings.Contains(err.Error(), \"not supported for table view\") {\n\t\t// retry with AggregateOperatorSumRate or switch panel to graph\n\t}\n}","preventionTips":["Encode operator/format compatibility in your panel schema","Pre-validate operators before calling PrepareMetricQuery","Keep rate() visualizations in graph panels"],"tags":["signoz","clickhouse","metrics","query-builder","table-view","aggregate-operator"],"backgroundTag":"unsupported-aggregate-operator","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}