Skip to content

Commit

Permalink
🏖️ fix migration error handling (#750)
Browse files Browse the repository at this point in the history
* reset error state

* iuse response error for warning
  • Loading branch information
petar-cvit authored Feb 7, 2025
1 parent e296536 commit e2b8f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cyclops-ui/src/components/pages/Helm/Releases/Releases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ const HelmReleases = () => {
const handleCancelMigrateModal = () => {
setReleaseMigrationModal(false);
setLoadingReleases(true);
setReleasesMigrationError({ message: "", description: "" });
setSelectedRowKeys([]);
setReleaseMigrationModalProgress({});
setBatchMigrationFinished(false);

axios
.get(`/api/helm/releases`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ export const HelmReleaseEdit = ({
setLoadingSubmitRequest(false);
onSubmitSuccess(releaseNamespace, releaseName);
})
.catch(() => {
.catch((e) => {
setLoadingSubmitRequest(false);
setError(mapResponseError(error));
setError(mapResponseError(e));
});
};

Expand Down

0 comments on commit e2b8f05

Please sign in to comment.