mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
3294b22da3
commit
3218d0ea37
|
|
@ -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}"`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user