fix command type

This commit is contained in:
Chuck1sn
2025-05-26 11:27:00 +08:00
parent dde5fecd62
commit 3f4a5f2e8b
8 changed files with 106 additions and 44 deletions

View File

@@ -7,6 +7,7 @@ import {
RequestError,
UnAuthError,
} from "../types/error";
import { z } from "zod";
const makeErrorHandler =
(
@@ -44,6 +45,11 @@ const makeErrorHandler =
level: "error",
content: err.detail ?? err.message,
});
} else if (err instanceof z.ZodError) {
showAlert({
level: "error",
content: err.errors[0].message,
});
} else {
showAlert({
level: "error",