From 87e3a38ea82fcbb735520c83700743df1d12ae60 Mon Sep 17 00:00:00 2001 From: Yonggang Liu Date: Wed, 3 Jul 2024 12:42:35 -0400 Subject: [PATCH] HARMONY-1806: Updated error message. --- .../workflow-orchestration/work-item-updates.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/services/harmony/app/backends/workflow-orchestration/work-item-updates.ts b/services/harmony/app/backends/workflow-orchestration/work-item-updates.ts index a7b3aa014..595624ee5 100644 --- a/services/harmony/app/backends/workflow-orchestration/work-item-updates.ts +++ b/services/harmony/app/backends/workflow-orchestration/work-item-updates.ts @@ -564,13 +564,14 @@ export async function preprocessWorkItem( durationMs = new Date().getTime() - resultStartTime; logger.debug('timing.HWIUWJI.getResultItemSize.end', { durationMs }); } catch (e) { - errorMessage = 'Could not get result item file size from output STAC'; + if (catalogItems) { + errorMessage = 'Cannot get result item file size from output STAC'; + } else { + errorMessage = 'Cannot parse STAC catalog output from service'; + } + logger.error(errorMessage); - logger.error('Caught exception:', { - message: e.message, - name: e.name, - stack: e.stack, - }); + logger.error(`Caught exception: ${e.message}`, { name: e.name, stack: e.stack }); status = WorkItemStatus.FAILED; } const result: WorkItemPreprocessInfo = {