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:
@@ -56,7 +56,7 @@ export const accountPageQueryRouter = router({
|
||||
const validatedAccountPageRefs =
|
||||
validateAccountPageRefsSchema.safeParse(cleanedData)
|
||||
if (!validatedAccountPageRefs.success) {
|
||||
console.info(`Failed to validate My Page Refs - (uid: ${uid})`)
|
||||
console.error(`Failed to validate My Page Refs - (uid: ${uid})`)
|
||||
console.error(validatedAccountPageRefs.error)
|
||||
return null
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export const accountPageQueryRouter = router({
|
||||
)
|
||||
|
||||
if (!validatedAccountPage.success) {
|
||||
console.info(`Failed to validate Account Page - (uid: ${uid})`)
|
||||
console.error(`Failed to validate Account Page - (uid: ${uid})`)
|
||||
console.error(validatedAccountPage.error)
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user