{"record":{"id":"bdb8f04f640e966f","repo":"SigNoz/signoz","slug":"codeinternal-bdb8f0","errorCode":"CodeInternal","errorMessage":"error fetching organization filters","messagePattern":"error fetching organization filters","errorType":"error_code","errorClass":null,"httpStatus":500,"severity":"error","filePath":"pkg/modules/quickfilter/implquickfilter/module.go","lineNumber":26,"sourceCode":"\t\"github.com/SigNoz/signoz/pkg/modules/quickfilter\"\n\tv3 \"github.com/SigNoz/signoz/pkg/query-service/model/v3\"\n\t\"github.com/SigNoz/signoz/pkg/types/quickfiltertypes\"\n\t\"github.com/SigNoz/signoz/pkg/valuer\"\n)\n\ntype module struct {\n\tstore quickfiltertypes.QuickFilterStore\n}\n\nfunc NewModule(store quickfiltertypes.QuickFilterStore) quickfilter.Module {\n\treturn &module{store: store}\n}\n\n// GetQuickFilters returns all quick filters for an organization.\nfunc (module *module) GetQuickFilters(ctx context.Context, orgID valuer.UUID) ([]*quickfiltertypes.SignalFilters, error) {\n\tstoredFilters, err := module.store.Get(ctx, orgID)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, errors.TypeInternal, errors.CodeInternal, \"error fetching organization filters\")\n\t}\n\n\tresult := make([]*quickfiltertypes.SignalFilters, 0, len(storedFilters))\n\tfor _, storedFilter := range storedFilters {\n\t\tsignalFilter, err := quickfiltertypes.NewSignalFilterFromStorableQuickFilter(storedFilter)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, errors.TypeInternal, errors.CodeInternal, \"error processing filter for signal: %s\", storedFilter.Signal)\n\t\t}\n\t\tresult = append(result, signalFilter)\n\t}\n\n\treturn result, nil\n}\n\n// GetSignalFilters returns quick filters for a specific signal in an organization.\nfunc (m *module) GetSignalFilters(ctx context.Context, orgID valuer.UUID, signal quickfiltertypes.Signal) (*quickfiltertypes.SignalFilters, error) {\n\tstoredFilter, err := m.store.GetBySignal(ctx, orgID, signal.StringValue())\n\tif err != nil {","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/modules/quickfilter/implquickfilter/module.go#L8-L44","documentation":"GetQuickFilters failed at the storage layer while loading all quick filters for an organization. module.store.Get(ctx, orgID) returned an error (DB connectivity, query failure, or deserialization), which is wrapped with CodeInternal. It does not indicate anything wrong with the request itself — the org's filter rows could not be read.","triggerScenarios":"GET endpoint that returns all quick filters for an org when the underlying database is unreachable, the quick_filters table is missing/corrupted, or a row fails to scan into the storable type.","commonSituations":"Database outage or migration that dropped/renamed the quick filter table, connection pool exhaustion, network partition between API server and Postgres/ClickHouse, or a schema drift after upgrading SigNoz.","solutions":["Check DB connectivity and that the quick filter storage table exists with the expected schema","Inspect server logs for the wrapped underlying error (driver message) returned alongside this one","Re-run or apply pending migrations if the table/columns changed after an upgrade","Retry the request once transient DB issues are resolved"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!orgId) throw new Error('orgId required'); // nothing else caller-side can prevent a DB read failure","typeGuard":null,"tryCatchPattern":"try { const filters = await getQuickFilters(orgId); } catch (e) { if (e.type === 'internal') { scheduleRetry(); showCachedFiltersIfAvailable(); } else throw e; }","preventionTips":["Monitor DB health and connection pool metrics","Keep API server and DB schema versions in sync via migrations","Cache last-known filters client-side to degrade gracefully"],"tags":["database","internal-error","quick-filters","golang"],"backgroundTag":"database-query-failed","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}