Skip to content

fix: recover cluster controls after request failures - #15

Open
Hanabi9248 wants to merge 2 commits into
IvorySQL:IVYC_REL_5_STABLEfrom
Hanabi9248:codex/cluster-request-errors
Open

Hanabi9248 wants to merge 2 commits into
IvorySQL:IVYC_REL_5_STABLEfrom
Hanabi9248:codex/cluster-request-errors

Conversation

@Hanabi9248

Copy link
Copy Markdown

When adding or editing a Kubernetes cluster fails, the rejection handler reads this.$message with an unbound this. It throws before showing the error or clearing the submit spinner. A failed cluster-list request also leaves the table loading overlay active.

Use the existing component reference in both submit handlers and clear the list loading flag on failure. The dialog stays open so the request can be retried.

Added component tests using axios-mock-adapter for both failed submissions, a failed list request, and a successful list response. On the original code, three tests fail; with this change, all 8 tests across 3 suites pass on Node 18 (vue-cli-service test:unit --runInBand). ESLint reports no errors and one warning for the test’s fixed method-name table. No backend deployment was tested.

Signed-off-by: Hanabi9248 <317387557+Hanabi9248@users.noreply.github.com>
Signed-off-by: Hanabi9248 <317387557+Hanabi9248@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant