mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
fix: 修复左侧菜单收起时无法展开子菜单的bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Provide } from '@midwayjs/core';
|
||||
import { IWebMiddleware, IMidwayKoaContext, NextFunction } from '@midwayjs/koa';
|
||||
import { logger } from '@certd/basic';
|
||||
import { Result } from '@certd/lib-server';
|
||||
import { BaseException, Result } from '@certd/lib-server';
|
||||
|
||||
@Provide()
|
||||
export class GlobalExceptionMiddleware implements IWebMiddleware {
|
||||
@@ -14,7 +14,11 @@ export class GlobalExceptionMiddleware implements IWebMiddleware {
|
||||
await next();
|
||||
logger.info('请求完成:', url, Date.now() - startTime + 'ms');
|
||||
} catch (err) {
|
||||
logger.error('请求异常:', url, Date.now() - startTime + 'ms', err);
|
||||
logger.error('请求异常:', url, Date.now() - startTime + 'ms', err.message);
|
||||
if (!(err instanceof BaseException)) {
|
||||
logger.error(err);
|
||||
}
|
||||
|
||||
ctx.status = 200;
|
||||
if (err.code == null || typeof err.code !== 'number') {
|
||||
err.code = 1;
|
||||
|
||||
Reference in New Issue
Block a user