Answer the question
In order to leave comments, you need to log in
How to catch Token mismatch exception?
Hello. The question is this: AJAX requests are implemented on the site, in response to each of which the server first checks the user who made the request. The very first check is whether there is any authorization at all or the request was made from an unauthorized user. It seems to work, but if you sit under your nickname for a while, doing nothing (for example, go somewhere) - and when you try to send an AJAX request, an error starts to appear: "Token mismatch exception", which is not caught by the standard if (!$user)...
.
How can you catch this exception, for example, to display a warning to the user?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question