I\'m calling an api through javascript using a jQuery.ajax call. The api respond with 401 if the user is not authenticated and I want to ignore this error only for this call.
Can you add a hidden field onto the page (i'm guessing its dynamically generated) like:
Then in you javascript, place
if ($('input[name=isLoggedIn"]').val() == "true") { //your ajax call here }