Skip to content

Commit f82be25

Browse files
committed
.
1 parent 623f4c5 commit f82be25

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

src/app/catalog/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export async function getServers(): Promise<V0ServerJson[]> {
1111

1212
if (resp.error) {
1313
console.error("[catalog] Failed to fetch servers:", resp.error);
14-
throw new Error("Failed to fetch servers");
14+
throw resp.error;
1515
}
1616

1717
if (!resp.data) {

src/app/error.tsx

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useEffect } from "react";
44
import { ErrorPage } from "@/components/error-page";
5-
import { NavbarLogo } from "@/components/navbar-logo";
65
import { Button } from "@/components/ui/button";
76

87
interface ErrorProps {
@@ -16,22 +15,15 @@ export default function RootErrorPage({ error, reset }: ErrorProps) {
1615
}, [error]);
1716

1817
return (
19-
<div className="flex flex-col h-screen">
20-
<header className="w-full border-b bg-muted/50 flex items-center justify-between pl-8 pr-4 h-16">
21-
<NavbarLogo />
22-
</header>
23-
<main className="flex flex-col flex-1 overflow-hidden px-4 py-5">
24-
<ErrorPage
25-
title="Something went wrong"
26-
actions={
27-
<Button onClick={reset} variant="default">
28-
Try again
29-
</Button>
30-
}
31-
>
32-
An unexpected error occurred. Please try again.
33-
</ErrorPage>
34-
</main>
35-
</div>
18+
<ErrorPage
19+
title="Something went wrong"
20+
actions={
21+
<Button onClick={reset} variant="default">
22+
Try again
23+
</Button>
24+
}
25+
>
26+
An unexpected error occurred. Please try again.
27+
</ErrorPage>
3628
);
3729
}

0 commit comments

Comments
 (0)