feat(storage): improve storage connectivity error handling and multi-instance support

Enhance error messaging for storage connectivity issues by sanitizing raw errors to prevent leaking sensitive information. Introduce a new utility function for consistent error handling across storage backend operations. Additionally, implement logic to support multi-instance storage backends, allowing for more flexible workspace configurations and improved reporting of active storage providers.
This commit is contained in:
wizardchen
2026-07-15 14:36:26 +08:00
committed by lyingbug
parent 6349fff002
commit a8dea5f9a3
8 changed files with 208 additions and 42 deletions
@@ -154,6 +154,10 @@ onUnmounted(() => {
})
const missingStorageEngine = computed(() => {
if (!kbInfo.value || isFAQ.value) return false
// storage_backend_id is authoritative; storage_provider_config.provider is a
// compatibility projection for older clients. Either being present means the
// KB has a bound storage instance and uploads should not be blocked.
if (kbInfo.value.storage_backend_id) return false
const spc = kbInfo.value.storage_provider_config
return !spc || !spc.provider
})