I’m working on an Ajax voting feature on my website. When a user clicks the like/dislike button, a request is sent to the server with request details. When a user isn’t logged in, the server returns a 401 Unauthorized:
The only issue with this is now I want users to be alerted that they have to sign in to vote. JQuery seems disregard data, status function on non 200 HTTP codes.
(none of the code under the POST request is run when a 401 is received.)