{"record":{"id":"7c1f3343d7bc0aef","repo":"toeverything/AFFiNE","slug":"unsupported-value-params-value-7c1f33","errorCode":null,"errorMessage":"Unsupported value: ${params.value}","messagePattern":"Unsupported value: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/modules/collection-rules/impls/filters/shared.ts","lineNumber":41,"sourceCode":"        this.docsService.allDocIds$(),\n      ]).pipe(\n        onStart(() => {\n          this.shareDocsListService.shareDocs?.revalidate();\n        }),\n        map(([shareDocsList, allDocIds]) => {\n          const shareDocIds = new Set(shareDocsList.map(item => item.id));\n          if (params.value === 'true') {\n            return shareDocIds;\n          } else if (params.value === 'false') {\n            const notShareDocIds = new Set<string>();\n            for (const id of allDocIds) {\n              if (!shareDocIds.has(id)) {\n                notShareDocIds.add(id);\n              }\n            }\n            return notShareDocIds;\n          } else {\n            throw new Error(`Unsupported value: ${params.value}`);\n          }\n        })\n      );\n    }\n    throw new Error(`Unsupported method: ${params.method}`);\n  }\n}\n","sourceCodeStart":23,"sourceCodeEnd":49,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/modules/collection-rules/impls/filters/shared.ts#L23-L49","documentation":"A value guard inside the shared-doc filter's 'is' method: after computing the set of shared doc ids, the boolean semantics only accept params.value of 'true' or 'false'. It fires when the rule's value is any other string, meaning the shared filter was given a non-boolean value; the interpolated value is the offending params.value.","triggerScenarios":"Thrown in the shared-docs filter when the filter value is neither 'true' nor 'false'.","commonSituations":"Occurs when a shared-docs filter has a non-boolean value, typically from malformed collection rules; set the value to true or false.","solutions":["Pass a value of the expected type for this filter.","Fix the filter params value."],"exampleFix":null,"handlingStrategy":"validation","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"}