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) {
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