feat: 优化未找到文献的提示
This commit is contained in:
parent
5d61d49f05
commit
6bf8061f0f
|
@ -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
|
||||
|
|
|
@ -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; // 或根据需要处理错误
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user