fix: structure logged data

This commit is contained in:
Arvid Norlin
2024-08-22 10:25:06 +02:00
parent e3ca26d0df
commit fac0d7acdc
2 changed files with 4 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ export const loyaltyPageQueryRouter = router({
if (!response.data) { if (!response.data) {
const notFoundError = notFound(response) const notFoundError = notFound(response)
console.error( console.error(
"contentstack.loyaltyPage not found error", "contentstack.loyaltyPage not found error",
JSON.stringify({ JSON.stringify({
@@ -118,7 +119,7 @@ export const loyaltyPageQueryRouter = router({
error: { code: notFoundError.code }, error: { code: notFoundError.code },
}) })
) )
throw notFoundError throw notFound(response)
} }
const blocks = response.data.loyalty_page.blocks const blocks = response.data.loyalty_page.blocks

View File

@@ -106,6 +106,8 @@ export const hotelQueryRouter = router({
return validatedRoom.data return validatedRoom.data
}) })
: [] : []
getHotelSuccessCounter.add(1, { hotelId, language, include })
console.info( console.info(
"api.hotels.hotel success", "api.hotels.hotel success",
JSON.stringify({ JSON.stringify({