diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx
index 2e8588e1..a55333c4 100644
--- a/src/pages/_error.tsx
+++ b/src/pages/_error.tsx
@@ -60,10 +60,10 @@ function ErrorPage(props: any) {
)}
- {errors[code].title}
+ {errors[code]?.title || errors[500].title}
- {errors[code].message}
+ {errors[code]?.message || errors[500].message}
{code != 1 && (