mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Switch plain errors in workflow to ApplicationError (no-changelog) (#7877)
Ensure all errors in `workflow` are `ApplicationError` or children of it and contain no variables in the message, to continue normalizing all the errors we report to Sentry Follow-up to: https://github.com/n8n-io/n8n/pull/7873
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
INodeTypes,
|
||||
INodeType,
|
||||
} from './Interfaces';
|
||||
import { ApplicationError } from './errors/application.error';
|
||||
|
||||
const STICKY_NODE_TYPE = 'n8n-nodes-base.stickyNote';
|
||||
|
||||
@@ -95,7 +96,7 @@ export function getDomainPath(raw: string, urlParts = URL_PARTS_REGEX): string {
|
||||
try {
|
||||
const url = new URL(raw);
|
||||
|
||||
if (!url.hostname) throw new Error('Malformed URL');
|
||||
if (!url.hostname) throw new ApplicationError('Malformed URL');
|
||||
|
||||
return sanitizeRoute(url.pathname);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user