CreateImageWizard: add creation failure alert
When image creation failed to start the wizard would get stuck in the saving state with no notice to the user. Now the user will get an error alert contain the status code and message. The wizard no longer gets stuck in the saving state.
This commit is contained in:
parent
933218376b
commit
7ea8168443
1 changed files with 9 additions and 0 deletions
|
|
@ -135,6 +135,15 @@ const CreateImageWizard = () => {
|
|||
title: 'Your image is being created',
|
||||
}));
|
||||
|
||||
setIsSaving(false);
|
||||
})
|
||||
.catch((err) => {
|
||||
dispatch(addNotification({
|
||||
variant: 'danger',
|
||||
title: 'Your image could not be created',
|
||||
description: 'Status code ' + err.response.status + ': ' + err.response.statusText,
|
||||
}));
|
||||
|
||||
setIsSaving(false);
|
||||
});
|
||||
} }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue