mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Remove usless catch blocks, and add a linting rule to prevent them (no-changelog) (#12730)
This commit is contained in:
committed by
GitHub
parent
4ee4552b0e
commit
202da76380
@@ -16,19 +16,15 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
operation,
|
||||
} as WebflowType;
|
||||
|
||||
try {
|
||||
switch (webflowNodeData.resource) {
|
||||
case 'item':
|
||||
returnData = await item[webflowNodeData.operation].execute.call(this, items);
|
||||
break;
|
||||
default:
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The operation "${operation}" is not supported!`,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
throw error;
|
||||
switch (webflowNodeData.resource) {
|
||||
case 'item':
|
||||
returnData = await item[webflowNodeData.operation].execute.call(this, items);
|
||||
break;
|
||||
default:
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The operation "${operation}" is not supported!`,
|
||||
);
|
||||
}
|
||||
|
||||
return [returnData];
|
||||
|
||||
Reference in New Issue
Block a user