Skip to content

Commit ed9cea8

Browse files
committed
Better parsing of errors in nodered
1 parent 98e34e8 commit ed9cea8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

OpenFlowNodeRED/src/nodered/nodes/NoderedUtil.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export class NoderedUtil {
4848
public static HandleError(node: Red, error: any): void {
4949
console.error(error);
5050
var message: string = error;
51+
if (typeof error === "string" || error instanceof String) {
52+
error = new Error((error as string));
53+
}
5154
try {
5255
if (error.message) {
5356
message = error.message;

0 commit comments

Comments
 (0)