fix: make sure all logged errors are preceeded with a message
Just logging an error makes it difficult to relate the error log to code in the codebase. Error logging a message right before the error itself makes it easier to search the codebase for that error log.
This commit is contained in:
@@ -77,7 +77,7 @@ export const navigationQueryRouter = router({
|
||||
const validatedMyPagesNavigationRefs =
|
||||
navigationRefsPayloadSchema.safeParse(refsResponse.data)
|
||||
if (!validatedMyPagesNavigationRefs.success) {
|
||||
console.info(
|
||||
console.error(
|
||||
`Failed to validate My Pages Navigation Refs - (lang: ${lang}`
|
||||
)
|
||||
console.error(validatedMyPagesNavigationRefs.error)
|
||||
@@ -109,7 +109,7 @@ export const navigationQueryRouter = router({
|
||||
response.data
|
||||
)
|
||||
if (!validatedMyPagesNavigation.success) {
|
||||
console.info(
|
||||
console.error(
|
||||
`Failed to validate My Pages Navigation Data - (lang: ${lang}`
|
||||
)
|
||||
console.error(validatedMyPagesNavigation.error)
|
||||
@@ -126,7 +126,7 @@ export const navigationQueryRouter = router({
|
||||
|
||||
const validatedNav = getNavigationSchema.safeParse(nav)
|
||||
if (!validatedNav.success) {
|
||||
console.info(
|
||||
console.error(
|
||||
`Failed to validate My Pages Navigation Return Data - (lang: ${lang}`
|
||||
)
|
||||
console.error(validatedNav.error)
|
||||
|
||||
Reference in New Issue
Block a user