mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): fix for no-uncaught-json-parse warnings
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
jsonParse,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
@@ -91,7 +92,8 @@ export class StopAndError implements INodeType {
|
||||
toThrow = this.getNodeParameter('errorMessage', 0) as string;
|
||||
} else {
|
||||
const json = this.getNodeParameter('errorObject', 0) as string;
|
||||
const errorObject = JSON.parse(json);
|
||||
// tslint:disable-next-line:no-any
|
||||
const errorObject = jsonParse<any>(json);
|
||||
|
||||
toThrow = {
|
||||
name: 'User-thrown error',
|
||||
|
||||
Reference in New Issue
Block a user