From fac0d7acdccda06f9a0a4d7bca739a29db204154 Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Thu, 22 Aug 2024 10:25:06 +0200 Subject: [PATCH] fix: structure logged data --- server/routers/contentstack/loyaltyPage/query.ts | 3 ++- server/routers/hotels/query.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/routers/contentstack/loyaltyPage/query.ts b/server/routers/contentstack/loyaltyPage/query.ts index 97d7209ca..2f0dc3d44 100644 --- a/server/routers/contentstack/loyaltyPage/query.ts +++ b/server/routers/contentstack/loyaltyPage/query.ts @@ -111,6 +111,7 @@ export const loyaltyPageQueryRouter = router({ if (!response.data) { const notFoundError = notFound(response) + console.error( "contentstack.loyaltyPage not found error", JSON.stringify({ @@ -118,7 +119,7 @@ export const loyaltyPageQueryRouter = router({ error: { code: notFoundError.code }, }) ) - throw notFoundError + throw notFound(response) } const blocks = response.data.loyalty_page.blocks diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index 70b8363ed..a18c9bc71 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -106,6 +106,8 @@ export const hotelQueryRouter = router({ return validatedRoom.data }) : [] + + getHotelSuccessCounter.add(1, { hotelId, language, include }) console.info( "api.hotels.hotel success", JSON.stringify({