diff --git a/packages/core/client/src/schema-component/antd/upload/shared.ts b/packages/core/client/src/schema-component/antd/upload/shared.ts index 3239d05a0..ab89c5040 100644 --- a/packages/core/client/src/schema-component/antd/upload/shared.ts +++ b/packages/core/client/src/schema-component/antd/upload/shared.ts @@ -228,7 +228,7 @@ export const toItem = (file) => { }; export const toFileList = (fileList: any) => { - return toArr(fileList?.filter(Boolean)).map(toItem); + return toArr(fileList).filter(Boolean).map(toItem); }; export const toValue = (fileList: any) => { diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts index 38f0dad4d..bddc4bd06 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts @@ -18,10 +18,6 @@ export class ErrorHandler { }, ], }; - - if (ctx.status === 500) { - console.error(err); - } } middleware() { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts index bcefb8edf..491c8a3a3 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts @@ -78,6 +78,7 @@ async function multipart(ctx: Context, next: Next) { if (err.name === 'MulterError') { return ctx.throw(400, err); } + ctx.logger.error(err); return ctx.throw(500); }