diff --git a/src/platform/assets/components/AssetCard.vue b/src/platform/assets/components/AssetCard.vue index 222a186f3..f12ed5490 100644 --- a/src/platform/assets/components/AssetCard.vue +++ b/src/platform/assets/components/AssetCard.vue @@ -226,11 +226,16 @@ async function assetRename(newName?: string) { if (newName) { // Optimistic update newNameRef.value = newName - const result = await assetService.updateAsset(asset.id, { - name: newName - }) - // Update with the actual name once the server responds - newNameRef.value = result.name + try { + const result = await assetService.updateAsset(asset.id, { + name: newName + }) + // Update with the actual name once the server responds + newNameRef.value = result.name + } catch (err: unknown) { + console.error(err) + newNameRef.value = undefined + } } }