mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
⚡ Add continueOnFail support to AWS Transcribe Node
This commit is contained in:
parent
2d9c2e1a1e
commit
a9184e38f8
|
@ -411,6 +411,7 @@ export class AwsTranscribe implements INodeType {
|
|||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
const operation = this.getNodeParameter('operation', 0) as string;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
if (resource === 'transcriptionJob') {
|
||||
//https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html
|
||||
if (operation === 'create') {
|
||||
|
@ -538,6 +539,14 @@ export class AwsTranscribe implements INodeType {
|
|||
} else {
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({ error: error.message });
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue