From 21c5034959f3a860b8ce9a60a36e026c3adb0fa0 Mon Sep 17 00:00:00 2001 From: Sathvika Date: Mon, 21 Sep 2026 10:56:50 +0530 Subject: [PATCH] =?UTF-8?q?CSTACKEX-309:=20enabling=20resize=20volume=20Ap?= =?UTF-8?q?i=20validation=20notification=20to=20s=E2=80=A6=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …how up in UI ### Description When resizing a volume, backend API validation errors (e.g. invalid size value) are silently swallowed and never shown to the user. This PR... File: ui/src/views/storage/ResizeVolume.vue, lines 147–151 The .catch() handler uses this.$notification.error() with a hardcoded path error.response.data.errorresponse.errortext. However, the CloudStack API only uses errorresponse as the response key for unknown commands. For known commands like resizeVolume, it uses the command's own response name (resizevolumeresponse) as the key. So error.response.data.errorresponse is always undefined, causing a silent TypeError that swallows the error entirely. $notifyError avoids this by using _.findKey() to find errortext regardless of what the key is named — which is why the same validation error shows correctly in UpdatePrimaryStorage.vue (which uses $notifyError) but not in ResizeVolume.vue. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [X] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [X] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? Screenshot 2026-09-16 at 12 30
24 PM Screenshot 2026-09-16 at 1 07 53 PM Screenshot 2026-09-16 at 1 08 07 PM Screenshot 2026-09-16 at 1 08 24 PM #### How did you try to break this feature and the system with this change? --- ui/src/views/storage/ResizeVolume.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/src/views/storage/ResizeVolume.vue b/ui/src/views/storage/ResizeVolume.vue index 5f9efd6ed506..25b7c3ff6b32 100644 --- a/ui/src/views/storage/ResizeVolume.vue +++ b/ui/src/views/storage/ResizeVolume.vue @@ -144,11 +144,7 @@ export default { }) this.closeModal() }).catch(error => { - this.$notification.error({ - message: `${this.$t('label.error')} ${error.response.status}`, - description: error.response.data.errorresponse.errortext, - duration: 0 - }) + this.$notifyError(error) }).finally(() => { this.loading = false })