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:
@@ -47,7 +47,7 @@ export const baseQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!validatedContactConfigConfig.success) {
|
||||
console.info(
|
||||
console.error(
|
||||
`Failed to validate Contact Config Data - (lang: ${ctx.lang})`
|
||||
)
|
||||
console.error(validatedContactConfigConfig.error)
|
||||
@@ -85,7 +85,7 @@ export const baseQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!validatedHeaderConfig.success) {
|
||||
console.info(`Failed to validate Header - (lang: ${input.lang})`)
|
||||
console.error(`Failed to validate Header - (lang: ${input.lang})`)
|
||||
console.error(validatedHeaderConfig.error)
|
||||
return null
|
||||
}
|
||||
@@ -126,7 +126,7 @@ export const baseQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!validatedFooterConfig.success) {
|
||||
console.info(`Failed to validate Footer - (lang: ${input.lang})`)
|
||||
console.error(`Failed to validate Footer - (lang: ${input.lang})`)
|
||||
console.error(validatedFooterConfig.error)
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user