mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-28 00:42:12 +08:00
fix: fix request not displaying interface error messages correctly (#4596)
This commit is contained in:
@@ -41,12 +41,12 @@ export function useResponseError(message: string, error: any = null) {
|
||||
|
||||
export function forbiddenResponse(event: H3Event<EventHandlerRequest>) {
|
||||
setResponseStatus(event, 403);
|
||||
return useResponseError('ForbiddenException', 'Forbidden Exception');
|
||||
return useResponseError('Forbidden Exception', 'Forbidden Exception');
|
||||
}
|
||||
|
||||
export function unAuthorizedResponse(event: H3Event<EventHandlerRequest>) {
|
||||
setResponseStatus(event, 401);
|
||||
return useResponseError('UnauthorizedException', 'Unauthorized Exception');
|
||||
return useResponseError('Unauthorized Exception', 'Unauthorized Exception');
|
||||
}
|
||||
|
||||
export function sleep(ms: number) {
|
||||
|
Reference in New Issue
Block a user