修复:来源字段筛选超时与重复扫描
This commit is contained in:
+4
-1
@@ -122,7 +122,10 @@ export async function request<T>(path: string, init: RequestInit = {}, timeoutMs
|
||||
}
|
||||
catch (error) {
|
||||
handleAccessFailure(error);
|
||||
if (error instanceof Error && error.name === 'RequestTimeoutError') throw new ApiError(408, '连接质量数据服务超时,请点击重新连接;服务恢复后可继续使用。');
|
||||
if (error instanceof Error && error.name === 'RequestTimeoutError') {
|
||||
const query = /^\/api\/(?:metrics(?:\/|$)|records(?:\/|$)|analysis\/(?:source\/|defects(?:\/|$)))/.test(requestPath(path));
|
||||
throw new ApiError(408, query ? '查询处理超时,请重试或调整筛选范围。' : '连接质量数据服务超时,请点击重新连接;服务恢复后可继续使用。');
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user