From 325c2a4180a2a0e0896d9ab92ba062a6e732a67f Mon Sep 17 00:00:00 2001
From: Mauricio Siu
Date: Sun, 2 Aug 2026 15:28:55 -0600
Subject: [PATCH] fix(ui): show real status code on error page
---
apps/dokploy/pages/_error.tsx | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/apps/dokploy/pages/_error.tsx b/apps/dokploy/pages/_error.tsx
index 8fd510796..4b1eeff4b 100644
--- a/apps/dokploy/pages/_error.tsx
+++ b/apps/dokploy/pages/_error.tsx
@@ -5,12 +5,11 @@ import { buttonVariants } from "@/components/ui/button";
import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
interface Props {
- statusCode: number;
- error?: Error;
+ statusCode?: number;
}
-export default function Custom404({ statusCode, error }: Props) {
- const displayStatusCode = statusCode || 400;
+export default function ErrorPage({ statusCode }: Props) {
+ const displayStatusCode = statusCode || 500;
const { config: whitelabeling } = useWhitelabelingPublic();
const appName = whitelabeling?.appName || "Dokploy";
const logoUrl = whitelabeling?.logoUrl || undefined;
@@ -45,12 +44,6 @@ export default function Custom404({ statusCode, error }: Props) {
{errorDescription}
)}
- {error && (
-
- )}
-
{
- const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
- return { statusCode, error: err };
+ErrorPage.getInitialProps = ({ res, err }: NextPageContext) => {
+ const statusCode = res ? res.statusCode : err ? (err.statusCode ?? 500) : 404;
+ return { statusCode };
};