{"record":{"id":"06df35235a89f664","repo":"SigNoz/signoz","slug":"codelicenseunavailable-06df35","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/modules/dashboard/impldashboard/module.go","lineNumber":52,"sourceCode":"\nfunc NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing, tagModule tag.Module) dashboard.Module {\n\tscopedProviderSettings := factory.NewScopedProviderSettings(settings, \"github.com/SigNoz/signoz/ee/modules/dashboard/impldashboard\")\n\tpkgDashboardModule := pkgimpldashboard.NewModule(store, settings, analytics, orgGetter, queryParser, tagModule)\n\n\treturn &module{\n\t\tpkgDashboardModule: pkgDashboardModule,\n\t\tstore:              store,\n\t\tsettings:           scopedProviderSettings,\n\t\tquerier:            querier,\n\t\tlicensing:          licensing,\n\t\ttagModule:          tagModule,\n\t}\n}\n\nfunc (module *module) CreatePublic(ctx context.Context, orgID valuer.UUID, publicDashboard *dashboardtypes.PublicDashboard) error {\n\t_, err := module.licensing.GetActive(ctx, orgID)\n\tif err != nil {\n\t\treturn 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\tdashboard, err := module.Get(ctx, orgID, publicDashboard.DashboardID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := dashboard.ErrIfNotPublishable(); err != nil {\n\t\treturn err\n\t}\n\n\tstorablePublicDashboard, err := module.store.GetPublic(ctx, publicDashboard.DashboardID.StringValue())\n\tif err != nil && !errors.Ast(err, errors.TypeNotFound) {\n\t\treturn err\n\t}\n\tif storablePublicDashboard != nil {\n\t\treturn errors.Newf(errors.TypeAlreadyExists, dashboardtypes.ErrCodePublicDashboardAlreadyExists, \"dashboard with id %s is already public\", storablePublicDashboard.DashboardID)\n\t}\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/ee/modules/dashboard/impldashboard/module.go#L34-L70","documentation":"CreatePublic (publish a dashboard publicly) is an enterprise feature gated on licensing: if licensing.GetActive(orgID) fails, this CodeLicenseUnavailable error is returned before the dashboard is fetched or stored.","triggerScenarios":"Calling CreatePublic(ctx, orgID, publicDashboard) for an org with no active license.","commonSituations":"OSS/self-hosted install without EE license attempting public dashboards, expired trial, license service unreachable.","solutions":["Install/renew an enterprise license for the org","Verify licensing configuration and connectivity via the appended error","Use non-public dashboards if licensing is not intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, err := licensing.GetActive(ctx, orgID); err != nil {\n\treturn errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, \"public dashboards unavailable\")\n}","typeGuard":null,"tryCatchPattern":"if err := module.CreatePublic(ctx, orgID, pd); err != nil {\n\tif errors.HasType(err, errors.TypeLicenseUnavailable) { /* hide public-share toggle */ }\n\treturn err\n}","preventionTips":["Feature-detect public dashboards by license before showing the share option"],"tags":["license","dashboard","enterprise","public-sharing"],"backgroundTag":"license-unavailable","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}