Handle login errors

javascript
customers

#1

Hi Im intermediate to javascript and first time user of a REST API in an application. I want to know the best way for error handling after i request to get a new customer from API. I want to display to the user weather username or password was incorrect


#2

Hi, in order to handle log in errors you would need to check the response from the API upon a failed login.

If you receive a 404 HTTP code then you could display a message that the username or password was incorrect.

Hope this helps, if you need any further information please let me know


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.