From bc47cf22adfdd01dd19bf12ca95aaafa87ab3726 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Tue, 31 May 2022 16:58:41 -0400 Subject: [PATCH] chore: add additional logging --- src/datalayer/persistance.js | 5 +++++ src/datalayer/writeService.js | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/datalayer/persistance.js b/src/datalayer/persistance.js index 4b69f99f..5162484d 100644 --- a/src/datalayer/persistance.js +++ b/src/datalayer/persistance.js @@ -80,6 +80,11 @@ export const pushChangeListToDataLayer = async (storeId, changelist) => { return true; } + logger.error( + `There was an error pushing your changes to the datalayer, ${JSON.stringify( + data, + )}`, + ); return false; } catch (error) { logger.info('There was an error pushing your changes to the datalayer'); diff --git a/src/datalayer/writeService.js b/src/datalayer/writeService.js index 46ba164b..1ede7837 100644 --- a/src/datalayer/writeService.js +++ b/src/datalayer/writeService.js @@ -111,12 +111,16 @@ const pushChangesWhenStoreIsAvailable = async ( 2, )}`, ); + const success = await dataLayer.pushChangeListToDataLayer( storeId, changeList, ); if (!success) { + logger.info( + `RPC failed when pushing to store ${storeId}, attempting retry.`, + ); retry(storeId, changeList, failedCallback, retryAttempts); } } else {