From 17463434d671ed315b62d55810fba8de69a4ed01 Mon Sep 17 00:00:00 2001 From: Weiko Date: Thu, 10 Oct 2024 18:58:25 +0200 Subject: [PATCH] improve matching filter error message (#7578) ## Context This can be thrown when a type is not properly supported by isRecordMatchingFilter. This should not happen but for some workspaces with legacy types this should help debugging. --- .../record-filter/utils/isRecordMatchingFilter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts b/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts index 2ddb31f0b12d..a8c26aa1eb10 100644 --- a/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts +++ b/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts @@ -290,7 +290,9 @@ export const isRecordMatchingFilter = ({ ); } default: { - throw new Error('Not implemented yet'); + throw new Error( + `Not implemented yet for field type "${objectMetadataField.type}"`, + ); } } });