{"record":{"id":"01faadd4434ec000","repo":"toeverything/AFFiNE","slug":"unsupported-system-order-by-params-key","errorCode":null,"errorMessage":"Unsupported system order by: ${params.key}","messagePattern":"Unsupported system order by: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/modules/collection-rules/impls/order-by/system.ts","lineNumber":16,"sourceCode":"import { Service } from '@toeverything/infra';\nimport type { Observable } from 'rxjs';\n\nimport { OrderByProvider } from '../../provider';\nimport type { OrderByParams } from '../../types';\n\nexport class SystemOrderByProvider extends Service implements OrderByProvider {\n  orderBy$(\n    items$: Observable<Set<string>>,\n    params: OrderByParams\n  ): Observable<string[]> {\n    const provider = this.framework.getOptional(\n      OrderByProvider('system:' + params.key)\n    );\n    if (!provider) {\n      throw new Error('Unsupported system order by: ' + params.key);\n    }\n    return provider.orderBy$(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/order-by/system.ts#L1-L21","documentation":"A provider-resolution guard in the system order-by provider: it looks up OrderByProvider('system:' + params.key) in the framework, and this fires when no such provider is registered. It means the sort config names a system order-by key that is not supported in the current build; the interpolated value is the unsupported params.key.","triggerScenarios":"Thrown in the system order-by dispatcher when no order-by provider exists for the given system key.","commonSituations":"Occurs when a collection sorts by a system key not supported in this build; choose a supported sort field.","solutions":["Use a supported system order-by key.","Remove the unknown order-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"}