This commit is contained in:
Simon Larsen
2023-03-01 22:15:25 +00:00
parent da9bd35ee6
commit 93cbac33fb
3 changed files with 13 additions and 2 deletions

View File

@@ -149,6 +149,12 @@ const components: Array<ComponentMetadata> = [
'This is executed when the JSON is successfully merged',
id: 'success',
},
{
title: 'Error',
description:
'This is executed when the JSON is not successfully merged',
id: 'error',
},
],
},
];

View File

@@ -23,6 +23,11 @@ export default class Queue {
queueName: QueueName,
jobId: string
): Promise<void> {
if(!jobId){
return;
}
const job: Job | undefined = await this.getQueue(queueName).getJob(
jobId
);

View File

@@ -56,9 +56,9 @@ export default class MergeJSON extends ComponentCode {
args['json1'] = JSON.parse(args['json1'] as string);
}
if (typeof args['json2'] !== 'object') {
if (typeof args['json1'] !== 'object') {
throw options.onError(
new BadDataException('JSON2 is should be of type object.')
new BadDataException('JSON1 is should be of type object.')
);
}