From 20d263d5b1dbbea34d3d855fbd3240403248b6a7 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Tue, 31 Dec 2024 17:28:59 -0300 Subject: [PATCH] Update update-conversions.js --- functions/lib/buzzlead/update-conversions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/lib/buzzlead/update-conversions.js b/functions/lib/buzzlead/update-conversions.js index e984099..d539c2a 100644 --- a/functions/lib/buzzlead/update-conversions.js +++ b/functions/lib/buzzlead/update-conversions.js @@ -1,4 +1,5 @@ const axios = require('axios'); +const logger = require('firebase-functions/logger'); const ecomUtils = require('@ecomplus/utils'); const parseStatus = status => { @@ -64,6 +65,9 @@ module.exports = async ({ appSdk, storeId, auth }, order, appData) => { } } catch (error) { if (error.response?.status === 412) { + logger.warn(`Conversion of ${orderNumber} for #${storeId} failed updating with status 412`, { + data: error.response.data, + }); return null; } console.error('Error making request:', error);