Procházet zdrojové kódy

adding mcp error in toast (#22987)

tags/1.7.1
znn před 3 měsíci
rodič
revize
773932b1e7
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5
    1
      web/app/components/tools/mcp/modal.tsx

+ 5
- 1
web/app/components/tools/mcp/modal.tsx Zobrazit soubor

@@ -95,8 +95,12 @@ const MCPModal = ({
setAppIcon({ type: 'image', url: res.url, fileId: extractFileId(res.url) || '' })
}
catch (e) {
let errorMessage = 'Failed to fetch remote icon'
const errorData = await (e as Response).json()
if (errorData?.code)
errorMessage = `Upload failed: ${errorData.code}`
console.error('Failed to fetch remote icon:', e)
Toast.notify({ type: 'warning', message: 'Failed to fetch remote icon' })
Toast.notify({ type: 'warning', message: errorMessage })
}
finally {
setIsFetchingIcon(false)

Načítá se…
Zrušit
Uložit