toeverything/AFFiNE · error · Error

Unknown property

Error message

Unknown property

What it means

A lookup guard in the property group-by provider: propertyInfo$(params.key) emitted null, meaning params.key does not correspond to any known workspace property. It fires when a collection's group-by config references a property key that is not registered in the workspace property service; the faulting input is params.key.

Source

Thrown at packages/frontend/core/src/modules/collection-rules/impls/group-by/property.ts:28

  extends Service
  implements GroupByProvider
{
  constructor(
    private readonly workspacePropertyService: WorkspacePropertyService
  ) {
    super();
  }

  groupBy$(
    items$: Observable<Set<string>>,
    params: GroupByParams
  ): Observable<Map<string, Set<string>>> {
    const property$ = this.workspacePropertyService.propertyInfo$(params.key);

    return property$.pipe(
      switchMap(property => {
        if (!property) {
          throw new Error('Unknown property');
        }
        const type = property.type;
        const provider = this.framework.getOptional(
          GroupByProvider('property:' + type)
        );
        if (!provider) {
          throw new Error('Unsupported property type');
        }
        return provider.groupBy$(items$, params);
      })
    );
  }
}

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Ensure the group-by property exists on the doc.
  2. Pick a valid property from the schema.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown in the group-by property dispatcher when no workspace property exists for the requested key.

Common situations: Occurs when a collection groups by a workspace property that was deleted or renamed; change the grouping to an existing property.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/90ce9ec99d53c18e. Report an issue: GitHub.