error message in login form

Hi, I trying to create a login form that when I call to the database, it respond with data.json().success = true, that works, but when I write the user or the password incorrectly, It doesn’t show the error messaje, I’m using a promise with a post call, this is my code: https://snippet.webix.com/rr7hdher
I hope someone understand what I trying to say. Thanks

most probably your server in case of error does not return required object.
instead it returns error or some other format.
check response on client side

const request = webix.ajax().post("...", {}).then(data=>data.json())
.then( data => { 
  console.log(data); 
  return data;
}, err => {
  console.log(err);
  throw err;
});