From fee32cae5546ac279dcf68baab915c531eaea2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBuraw?= <9116238+krzysztofzuraw@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:48:19 +0100 Subject: [PATCH] Remove tax base payload & dont send stringifed tax calc result --- .../avatax/src/pages/api/webhooks/checkout-calculate-taxes.ts | 4 ---- apps/avatax/src/pages/api/webhooks/order-calculate-taxes.ts | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/avatax/src/pages/api/webhooks/checkout-calculate-taxes.ts b/apps/avatax/src/pages/api/webhooks/checkout-calculate-taxes.ts index 24360470b..39a6f1579 100644 --- a/apps/avatax/src/pages/api/webhooks/checkout-calculate-taxes.ts +++ b/apps/avatax/src/pages/api/webhooks/checkout-calculate-taxes.ts @@ -47,10 +47,6 @@ const handler = checkoutCalculateTaxesSyncWebhook.createHandler(async (req, res, subscriptionErrorChecker.checkPayload(payload); - logger.info("Tax base payload for checkout calculate taxes", { - payload: payload.taxBase, - }); - loggerContext.set(ObservabilityAttributes.CHANNEL_SLUG, ctx.payload.taxBase.channel.slug); loggerContext.set(ObservabilityAttributes.CHECKOUT_ID, ctx.payload.taxBase.sourceObject.id); diff --git a/apps/avatax/src/pages/api/webhooks/order-calculate-taxes.ts b/apps/avatax/src/pages/api/webhooks/order-calculate-taxes.ts index a60ef9ffd..d5f9821de 100644 --- a/apps/avatax/src/pages/api/webhooks/order-calculate-taxes.ts +++ b/apps/avatax/src/pages/api/webhooks/order-calculate-taxes.ts @@ -207,8 +207,7 @@ const handler = orderCalculateTaxesSyncWebhook.createHandler(async (req, res, ct discountStrategy, ); - // eslint-disable-next-line @saleor/saleor-app/logger-leak - logger.info("Taxes calculated", { calculatedTaxes: JSON.stringify(calculatedTaxes) }); + logger.info("Taxes calculated", { calculatedTaxes: calculatedTaxes }); ClientLogStoreRequest.create({ level: "info",