From 3218d0ea37ecfa9daa9128c8a5c0117e871d2485 Mon Sep 17 00:00:00 2001 From: Emilia <100027345+sovietspaceship@users.noreply.github.com> Date: Thu, 24 Sep 2026 11:35:08 +0100 Subject: [PATCH] fix(Notion Node): Use UserError for an unmatched database-mention regex The resource-locator value comes from the user or an expression, so a failed extraction is a user error, not an unexpected one. Co-Authored-By: Claude Sonnet 5 --- packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts index 14261136fa3..4608dd63093 100644 --- a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts @@ -24,7 +24,7 @@ import { NodeOperationError, safeInternalRegex, setSafeObjectProperty, - UnexpectedError, + UserError, } from 'n8n-workflow'; import { validate as uuidValidate } from 'uuid'; @@ -1123,7 +1123,7 @@ export function extractDatabaseMentionRLC(blockValues: IDataObject[]) { const extracted = safeInternalRegex.exec(txt.database.__regex, txt.database.value); const databaseId = extracted?.[1]; if (databaseId === undefined) { - throw new UnexpectedError( + throw new UserError( `Could not extract the database ID from "${txt.database.value}"`, ); }