mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -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 resource = this.getNodeParameter('resource', 0) as string;
|
||||||
const operation = this.getNodeParameter('operation', 0) as string;
|
const operation = this.getNodeParameter('operation', 0) as string;
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
|
try {
|
||||||
if (resource === 'transcriptionJob') {
|
if (resource === 'transcriptionJob') {
|
||||||
//https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html
|
//https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html
|
||||||
if (operation === 'create') {
|
if (operation === 'create') {
|
||||||
|
@ -538,6 +539,14 @@ export class AwsTranscribe implements INodeType {
|
||||||
} else {
|
} else {
|
||||||
returnData.push(responseData as IDataObject);
|
returnData.push(responseData as IDataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
if (this.continueOnFail()) {
|
||||||
|
returnData.push({ error: error.message });
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return [this.helpers.returnJsonArray(returnData)];
|
return [this.helpers.returnJsonArray(returnData)];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue