Skip to content

Commit

Permalink
Update update-conversions.js
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored Dec 31, 2024
1 parent deb6f49 commit 20d263d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions functions/lib/buzzlead/update-conversions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const axios = require('axios');
const logger = require('firebase-functions/logger');
const ecomUtils = require('@ecomplus/utils');

const parseStatus = status => {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 20d263d

Please sign in to comment.