Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 5166ca3

Browse files
committed
chore: display update error status
1 parent a4a6671 commit 5166ca3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/pages/admin/System.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Card from "~/components/Card";
1515
import CardRow from "~/components/CardRow";
1616
import CardHeader from "~/components/CardHeader";
1717
import CardFooter from "~/components/CardFooter";
18+
import { stat } from "fs";
1819

1920
type Status = "ok" | "sent" | "processing" | "error";
2021

@@ -320,8 +321,14 @@ function Mise() {
320321
onClick={() => {
321322
setUpdateLoading(true);
322323

323-
Api.post("/admin/system/mise")
324-
.then(() => {
324+
Api.post<{ status: "error" | "ok" }>("/admin/system/mise")
325+
.then(({ status }) => {
326+
if (status === "error") {
327+
setUpdateError(
328+
"An error occurred while upgrading mise. Check instance logs for more details."
329+
);
330+
}
331+
325332
setRefreshToken(Date.now());
326333
})
327334
.catch(() => {

0 commit comments

Comments
 (0)