CreateImageWizard: show error details on save
Show details when the wizard sends a request that results in an error. Now that AWS and Azure have a maximum size, this needs to be shown.
This commit is contained in:
parent
2971f501d9
commit
1df2df1360
1 changed files with 6 additions and 5 deletions
|
|
@ -554,15 +554,16 @@ const CreateImageWizard = () => {
|
|||
setIsSaving(false);
|
||||
})
|
||||
.catch((err) => {
|
||||
let msg = err.response.statusText;
|
||||
if (err.response.data?.errors[0]?.detail) {
|
||||
msg = err.response.data?.errors[0]?.detail;
|
||||
}
|
||||
|
||||
dispatch(
|
||||
addNotification({
|
||||
variant: 'danger',
|
||||
title: 'Your image could not be created',
|
||||
description:
|
||||
'Status code ' +
|
||||
err.response.status +
|
||||
': ' +
|
||||
err.response.statusText,
|
||||
description: 'Status code ' + err.response.status + ': ' + msg,
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue