fix: change bad JSON.stringify:s

This commit is contained in:
Arvid Norlin
2024-08-22 15:27:51 +02:00
parent 8340f1ff6c
commit 7cd6367c15
7 changed files with 69 additions and 27 deletions
@@ -19,14 +19,15 @@ export const hotelPageQueryRouter = router({
uid,
})
if (!response.data) {
const notFoundError = notFound(response)
console.error(
"contentstack.hotelPage not found error",
JSON.stringify({
query: { lang, uid },
error: response,
error: { code: notFoundError.code },
})
)
throw notFound(response)
throw notFoundError
}
const validatedHotelPage = validateHotelPageSchema.safeParse(response.data)