So I have a small login to an API and my problem now is that if the login didn't worked, I am displaying an alert message. But when I am passing the good user I'm getting that the error object res.errors[0] is undefined (which of course is true). What is a good way to remake this code to work on both?So I have a small login to an API and my proble