{"record":{"id":"4e3f44e66672cd6a","repo":"toeverything/AFFiNE","slug":"unsupported-system-group-by-params-key","errorCode":null,"errorMessage":"Unsupported system group by: ${params.key}","messagePattern":"Unsupported system group by: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/modules/collection-rules/impls/group-by/system.ts","lineNumber":16,"sourceCode":"import { Service } from '@toeverything/infra';\nimport type { Observable } from 'rxjs';\n\nimport { GroupByProvider } from '../../provider';\nimport type { GroupByParams } from '../../types';\n\nexport class SystemGroupByProvider extends Service implements GroupByProvider {\n  groupBy$(\n    items$: Observable<Set<string>>,\n    params: GroupByParams\n  ): Observable<Map<string, Set<string>>> {\n    const provider = this.framework.getOptional(\n      GroupByProvider('system:' + params.key)\n    );\n    if (!provider) {\n      throw new Error('Unsupported system group by: ' + params.key);\n    }\n    return provider.groupBy$(items$, params);\n  }\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/modules/collection-rules/impls/group-by/system.ts#L1-L21","documentation":"A provider-resolution guard in the system group-by provider: it looks up GroupByProvider('system:' + params.key) in the framework, and this fires when no provider is registered under that key. It means the group-by config names a system grouping key that the current build does not support; the faulting input is params.key.","triggerScenarios":"Thrown in the system group-by dispatcher when no group-by provider exists for the given system key.","commonSituations":"Occurs when a collection uses a system group-by key unknown to this build; select a supported grouping field in the collection settings.","solutions":["Use a supported system group-by key.","Remove the unknown group-by parameter."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}