mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: correct error handling in URL processing function
This commit is contained in:
parent
9b621bc783
commit
7a77610bcf
|
|
@ -1239,7 +1239,7 @@ async function saveUrl() {
|
|||
async function processUrl(url: string) {
|
||||
try {
|
||||
const appId = props.appId || props.applicationDetails?.id;
|
||||
const res = await imageApi.getFile(appId, {url});
|
||||
const res = await imageApi.getFile(appId, {url})
|
||||
if (res.data['status_code'] !== 200) {
|
||||
MsgWarning(url + ' ' + t('chat.uploadFile.invalidUrl'));
|
||||
return;
|
||||
|
|
@ -1305,7 +1305,7 @@ async function saveUrl() {
|
|||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
MsgWarning(`${url} 无法访问`);
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue