From 4ef724059816b408efaa99d749ecd0ea3037f634 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 21 Jul 2021 17:26:19 +0100 Subject: [PATCH] Handle other error types in Manage Palette view We still get [object Object] appearing in the palette manager sometimes. This fix nails down another cause - where the err property has a 'code' but no 'message' property. This happens with the type_already_registered error --- .../@node-red/editor-client/src/js/ui/palette-editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index e57a19349..ff8b06e14 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -264,6 +264,8 @@ RED.palette.editor = (function() { var errMessage = set.err; if (set.err.message) { errMessage = set.err.message; + } else if (set.err.code) { + errMessage = set.err.code; } $("
  • ").text(errMessage).appendTo(nodeEntry.errorList); }