CF2-85: Added error body text in register error notifications

This commit is contained in:
KharchenkoVladimir 2021-10-25 12:03:24 +05:00
parent 2f6e2fbc4e
commit 30efdaed17
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ export default function Login() {
history.push('well')
}catch(e){
if(e.status === 400)
openNotificationError(e.message)
openNotificationError(e.body)
console.error(`Error ${e}`)
setErrorVisible(true)

View File

@ -95,7 +95,7 @@ export default function Register() {
openNotification("Заявка на регистрацию отправлена.", 'success')
history.push("/login");
}catch(e){
openNotification(e.message, 'error')
openNotification(e.body, 'error')
console.error(`Error ${e}`)
setLoader(false)
}
@ -158,7 +158,7 @@ export default function Register() {
{createInput('name', 'Имя', false)}
{createInput('surName', 'Фамилия', false)}
{createInput('patronymic', 'Отчество',false)}
{createInput('email', 'Отчество',false)}
{createInput('email', 'Email',false)}
{createInput('phone', 'Номер телефона',false)}
<Form.Item
name="idCompany"