fix: change bad JSON.stringify:s
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { error } from "console"
|
||||
|
||||
import { GetContactConfig } from "@/lib/graphql/Query/ContactConfig.graphql"
|
||||
import {
|
||||
GetCurrentFooter,
|
||||
@@ -42,11 +44,12 @@ export const baseQueryRouter = router({
|
||||
})
|
||||
|
||||
if (!response.data) {
|
||||
const notFoundError = notFound(response)
|
||||
console.error(
|
||||
"contentstack.config not found error",
|
||||
JSON.stringify({ query: { lang }, error: response })
|
||||
JSON.stringify({ query: { lang }, error: { code: notFoundError.code } })
|
||||
)
|
||||
throw notFound(response)
|
||||
throw notFoundError
|
||||
}
|
||||
|
||||
const validatedContactConfigConfig = validateContactConfigSchema.safeParse(
|
||||
@@ -101,16 +104,17 @@ export const baseQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!response.data) {
|
||||
const notFoundError = notFound(response)
|
||||
console.error(
|
||||
"contentstack.header not found error",
|
||||
JSON.stringify({
|
||||
query: {
|
||||
lang: input.lang,
|
||||
},
|
||||
error: response,
|
||||
error: { code: notFoundError.code },
|
||||
})
|
||||
)
|
||||
throw notFound(response)
|
||||
throw notFoundError
|
||||
}
|
||||
|
||||
const validatedHeaderConfig = validateHeaderConfigSchema.safeParse(
|
||||
@@ -179,16 +183,17 @@ export const baseQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!response.data) {
|
||||
const notFoundError = notFound(response)
|
||||
console.error(
|
||||
"contentstack.footer not found error",
|
||||
JSON.stringify({
|
||||
query: {
|
||||
lang: input.lang,
|
||||
},
|
||||
error: response,
|
||||
error: { code: notFoundError.code },
|
||||
})
|
||||
)
|
||||
throw notFound(response)
|
||||
throw notFoundError
|
||||
}
|
||||
|
||||
const validatedFooterConfig = validateFooterConfigSchema.safeParse(
|
||||
|
||||
Reference in New Issue
Block a user