perf: cache userSettings, improve #1013
This commit is contained in:
parent
55aff4778b
commit
d2ef57bcfa
3 changed files with 36 additions and 17 deletions
|
@ -11,6 +11,9 @@ const errorCodes: Record<number, string> = {
|
|||
404: 'Page not found',
|
||||
}
|
||||
|
||||
if (process.dev)
|
||||
console.error(error)
|
||||
|
||||
const defaultMessage = 'Something went wrong'
|
||||
|
||||
const message = error.message ?? errorCodes[error.statusCode!] ?? defaultMessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue