fix(smart-scope): handle invalid filters gracefully in count calculation

Validate smart scope filter rules before constructing query clauses during count computation. Catch validation errors for broken rules so invalid filters return null for bookCount rather than triggering an internal server error when fetching all smart scopes.

Closes #787
This commit is contained in:
neon
2026-07-26 21:08:51 +00:00
parent 9b2430a47e
commit c0bd9ecf69
9 changed files with 334 additions and 20 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ export interface SmartScope {
isPublic: boolean;
syncToKobo: boolean;
displayOrder: number;
bookCount?: number;
bookCount?: number | null;
createdAt: string;
updatedAt: string;
}