Skip to content

Commit

Permalink
Log an error when failing to send sqs message.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Oct 9, 2024
1 parent 3d39603 commit 1a8ecf4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/backend-common/src/sqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ export const generateOutputSignedUrlAndSendMessage = async (
JSON.stringify(job),
s3Key,
);
if (isSqsFailure(messageResult) && translationRequested) {
logger.info(
`Failed to send message, error message: ${messageResult.errorMsg}`,
);
return messageResult;
}
if (!isSqsFailure(messageResult) && translationRequested) {
return await sendMessage(
client,
Expand Down

0 comments on commit 1a8ecf4

Please sign in to comment.