Proper error handling in the ajax passwdStrength method