feat: 优化未找到文献的提示

This commit is contained in:
liuweiqing 2024-03-15 15:47:56 +08:00
parent 5d61d49f05
commit 6bf8061f0f
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ async function getArxivPapers(
return result;
} catch (error: any) {
throw new Error(
`Error fetching data from Arxiv API:${JSON.stringify(
`Arxiv失败请使用英文并缩短关键词:${JSON.stringify(
error.response,
null,
2

View File

@ -37,7 +37,7 @@ async function getPubMedPapers(
// 这里只返回了ID列表你可能需要根据实际需要进行调整
return idList;
} catch (error) {
console.error("Error fetching data from PubMed API:", error);
console.error(" PubMed API失败(请使用英文并缩短关键词):", error);
return null; // 或根据需要处理错误
}
}

View File

@ -52,7 +52,7 @@ async function getSemanticPapers(
} catch (error: any) {
// console.error("Error fetching data from Semantic Scholar API:", error);
throw new Error(
`Error fetching data from Semantic Scholar API:${JSON.stringify(
`Semantic Scholar fail请使用英文并缩短关键词:${JSON.stringify(
error.response,
null,
2