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 = {