fix: change bad JSON.stringify:s
This commit is contained in:
@@ -55,6 +55,7 @@ export const loyaltyPageQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!refsResponse.data) {
|
||||
const notFoundError = notFound(refsResponse)
|
||||
console.error(
|
||||
"contentstack.loyaltyPage.refs not found error",
|
||||
JSON.stringify({
|
||||
@@ -62,10 +63,10 @@ export const loyaltyPageQueryRouter = router({
|
||||
lang,
|
||||
uid,
|
||||
},
|
||||
error: JSON.stringify(refsResponse),
|
||||
error: { code: notFoundError.code },
|
||||
})
|
||||
)
|
||||
throw notFound(refsResponse)
|
||||
throw notFoundError
|
||||
}
|
||||
|
||||
const cleanedData = removeEmptyObjects(refsResponse.data)
|
||||
@@ -110,14 +111,15 @@ export const loyaltyPageQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!response.data) {
|
||||
const notFoundError = notFound(response)
|
||||
console.error(
|
||||
"contentstack.loyaltyPage not found error",
|
||||
JSON.stringify({
|
||||
query: { lang, uid },
|
||||
error: response,
|
||||
error: { code: notFoundError.code },
|
||||
})
|
||||
)
|
||||
throw notFound(response)
|
||||
throw notFoundError
|
||||
}
|
||||
|
||||
const blocks = response.data.loyalty_page.blocks
|
||||
|
||||
Reference in New Issue
Block a user