zanePerfor与Sentry同时使用会出现无限循环报错
Sapphire2k opened this issue · 0 comments
Sapphire2k commented
看了一下报错信息是因为Sentry会监听fetch Api的报错
/** JSDoc */
private _instrumentFetch()
...
const fetchData: {
method: string;
url: string;
status_code?: number;
} = {
method: isString(method) ? method.toUpperCase() : method,
url,
};
return originalFetch
.apply(global, args)
.then((response: Response) => {
fetchData.status_code = response.status;
Breadcrumbs.addBreadcrumb(
{
category: 'fetch',
data: fetchData,
type: 'http',
},
{
input: args,
response,
},
);
return response;
})
主要是这里的response
为undefined
,获取status
的时候就报错了,然后就出现zanePerfor、Sentry无限报错