mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
g
Co-authored-by: Jack W. <Jack5079@users.noreply.github.com>
This commit is contained in:
parent
a761e3f470
commit
4882a8b352
File diff suppressed because one or more lines are too long
|
@ -15,13 +15,12 @@ export default async function ServeError(
|
|||
reason: string
|
||||
) {
|
||||
// fetch error page if not cached
|
||||
if (!errorPage) {
|
||||
errorPage = (
|
||||
errorPage ??= (
|
||||
(await readFile(`${process.cwd()}/dist/error.html`).catch((err) =>
|
||||
console.error(err)
|
||||
)) || "<pre>$code $text</pre>"
|
||||
).toString()
|
||||
}
|
||||
)) ?? "<pre>$code $text</pre>"
|
||||
).toString()
|
||||
|
||||
|
||||
// serve error
|
||||
return ctx.html(
|
||||
|
|
Loading…
Reference in a new issue