Open cafeBabe1 opened 4 months ago
凑巧看到,给点拙见。 看起来是接口没返回才会遇到的问题,提前判断下?
const { options } = req;
const { getResponse } = options;
const resData = getResponse ? res.data : res;
// 在访问之前先检查 resData 是否为 null 或 undefined
if (resData == null) {
throw new Error('Response data is null or undefined');
}
const errorInfo = errorAdaptor(resData, ctx);
是request.ts中的问题(如下)
这段代码怎么让其不生效呢?