Skip to content

Commit bc6cec3

Browse files
committed
HARMONY-1995: Updated error messages.
1 parent fc0c2cc commit bc6cec3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

services/harmony/app/backends/workflow-orchestration/work-item-updates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ Promise<{ finalStatus: JobStatus, finalMessage: string; }> {
114114

115115
let finalMessage = '';
116116
if ((errorCount > 1) && (finalStatus == JobStatus.FAILED)) {
117-
finalMessage = `The job failed with ${errorCount} errors and ${warningCount} warnings. See the errors and warnings fields for more details`;
117+
finalMessage = `The job failed with ${errorCount} errors and ${warningCount} warnings. See the errors and warnings fields of the job status page for more details.`;
118118
} else if ((errorCount == 1) && (finalStatus == JobStatus.FAILED)) {
119119
const jobError = (await getErrorMessagesForJob(tx, job.jobID, 1))[0];
120120
finalMessage = jobError.message;
121121
} else if ((warningCount > 1) && (finalStatus == JobStatus.SUCCESSFUL)) {
122-
finalMessage = `The job succeeded with ${warningCount} warnings. See the warnings fields for more details`;
122+
finalMessage = `The job succeeded with ${warningCount} warnings. See the warnings field of the job status page for more details.`;
123123
} else if ((warningCount == 1) && (finalStatus == JobStatus.SUCCESSFUL)) {
124124
const jobWarning = (await getWarningMessagesForJob(tx, job.jobID, 1))[0];
125125
finalMessage = jobWarning.message;

services/harmony/test/ignore-errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ describe('ignoreErrors', function () {
331331
// all work items failing should trigger job failure
332332
const { job } = await Job.byJobID(db, secondSwathItem.jobID);
333333
expect(job.status).to.equal(JobStatus.FAILED);
334-
expect(job.message).to.equal('The job failed with 2 errors and 0 warnings. See the errors and warnings fields for more details');
334+
expect(job.message).to.equal('The job failed with 2 errors and 0 warnings. See the errors and warnings fields of the job status page for more details.');
335335
const currentWorkItems = (await getWorkItemsByJobId(db, job.jobID)).workItems;
336336
expect(currentWorkItems.length).to.equal(4);
337337
expect(currentWorkItems.filter((item) => item.status === WorkItemStatus.SUCCESSFUL && item.serviceID === 'harmonyservices/query-cmr:stable').length).to.equal(1);

0 commit comments

Comments
 (0)