MSP-3347 add handle error

This commit is contained in:
mikheykinnv committed 2024-06-28 14:05:24 +03:00
1 parent 95e76a7e2a
commit 261692177d
1 file changed
+2 -1
+2 -1
View File
@@ -92,8 +92,8 @@ const ConfigurationEditorPage: FC = () => {
createUpdateConfig(cleanEmptyParamsObject(newData))
.unwrap()
.then(({ id }) => {
message.success('Конфигурация успешно сохранена')
isNew && navigate(`/${moduleId}/configEditor/${id}`)
message.success('Конфигурация успешно сохранена')
})
.catch((e) => {
if (e.data.errorCode === 2004) {
@@ -105,6 +105,7 @@ const ConfigurationEditorPage: FC = () => {
if (e.data.errorCode === 400) {
message.error('Невалидный JSON объект')
}
message.error('Ошибка обновления элемента')
})
}