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:
Michael Zetterberg
2024-07-24 11:32:15 +02:00
parent 80c80fe1bd
commit 71dcf30719
18 changed files with 56 additions and 46 deletions
+1
View File
@@ -126,6 +126,7 @@ export const middleware: NextMiddleware = async (request) => {
}
} catch (e) {
if (e instanceof Error) {
console.error("Error in webView middleware")
console.error(`${e.name}: ${e.message}`)
}