diff --git a/packages/fes-plugin-request/src/template/request.js b/packages/fes-plugin-request/src/template/request.js index a0a69193..e231af38 100644 --- a/packages/fes-plugin-request/src/template/request.js +++ b/packages/fes-plugin-request/src/template/request.js @@ -120,6 +120,12 @@ export const request = (url, data, options = {}) => { const { dataHandler, errorHandler } = getCustomerHandler(context, options); return currentRequestInstance.request(context).then(async () => { + if (context.config.skipErrorHandler) { + console.warn('3.x 已移除 skipErrorHandler 参数,请改用 dataHandler 处理'); + if (context.config.skipErrorHandler === true || context.response?.data?.code === context.config.skipErrorHandler) { + return Promise.reject(context.response); + } + } if (!context.error) { return dataHandler(context.response.data, context.response); }