Skip to content

Commit

Permalink
Add log to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalNewsTV committed Feb 24, 2025
1 parent 0c91bce commit 162dc25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/paths/record-caching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ function postActivity(): RequestHandler {
try {
const response = await Promise.all(a?.media_keys?.map(async (key: string) => getFileFromS3(key)));
resObj[a.activity_id].media = getMediaItemsList(response, a.media_keys);
} catch (ex) {
} catch (error) {
defaultLog.error({
label: NAMESPACE,
error: error,
message: 'Error occured while fetching media from bucket',
body: req.body.idList
});
Expand All @@ -116,6 +117,7 @@ function postActivity(): RequestHandler {
namespace: NAMESPACE
});
} catch (error) {
defaultLog.debug({ label: NAMESPACE, error: error, body: req.body });
return res.status(500).json({
message: 'Unable to fetch ids in list.',
request: req.body,
Expand Down

0 comments on commit 162dc25

Please sign in to comment.