I have a page that sends something to the server via AJAX. The server side of the script returns a status code 401 if the user is not registered or the user does not have the right to send messages. The problem is that the browser asks the user for a login dialog, and we have no way to suppress it. Is it possible to change 401 from 500? If not, what suitable, generic or custom code can I use instead?
source share