diff --git a/packages/node_modules/@node-red/registry/lib/registry.js b/packages/node_modules/@node-red/registry/lib/registry.js index ec55330f1..baee42bf5 100644 --- a/packages/node_modules/@node-red/registry/lib/registry.js +++ b/packages/node_modules/@node-red/registry/lib/registry.js @@ -194,7 +194,7 @@ function addModule(module) { if (!set.err) { set.types.forEach(function(t) { if (nodeTypeToId.hasOwnProperty(t)) { - set.err = "Type already registered"; + set.err = new Error("Type already registered"); set.err.code = "type_already_registered"; set.err.details = { type: t,