From a19d82b11b361c69bdc12bc99c10d832b23a0d55 Mon Sep 17 00:00:00 2001 From: Derock Date: Mon, 4 Mar 2024 12:51:37 -0500 Subject: [PATCH] feat: better errors --- src/app/error.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app/error.tsx b/src/app/error.tsx index 2774ff0..2b6d0fe 100644 --- a/src/app/error.tsx +++ b/src/app/error.tsx @@ -2,6 +2,7 @@ import { redirect } from "next/navigation"; import { Button, buttonVariants } from "~/components/ui/button"; +import { Card } from "~/components/ui/card"; export default function Error({ error, @@ -26,9 +27,19 @@ export default function Error({

Error

-

- An unexpected error has occured:
{error.message} -

+ + {error.message.includes("connect ENOENT /var/run/docker.sock") ? ( + +

Docker is not running on the server.

+

+ Please start the Docker daemon and reload the page. +

+
+ ) : ( +

+ An unexpected error has occured:
{error.message} +

+ )} {/* show stacktrace if development */} {process && process.env.NODE_ENV === "development" && (