fix: errorMessage has to throw apperror code if apperror

This commit is contained in:
Julien Froidefond
2025-02-28 08:00:34 +01:00
parent 5893f1a15f
commit bc2ceadb8f
9 changed files with 38 additions and 8 deletions

View File

@@ -30,6 +30,13 @@ async function HomePage() {
if (error instanceof AppError && error.code === ERROR_CODES.KOMGA.MISSING_CONFIG) {
redirect("/settings");
}
if (error instanceof AppError) {
return (
<main className="container mx-auto px-4 py-8">
<ErrorMessage errorCode={error.code} />
</main>
);
}
return (
<main className="container mx-auto px-4 py-8">