mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-14 05:33:42 +08:00
fix command type
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user