+ Start a Discussion
ca_peterson_oldca_peterson_old 

Handling session epxiration

I've noticed that the usual error handling for the ajax toolkit doesn't work with errors related to session expiration, that is when any error besides a session ID being invalid happens my js displays a nice helpful error message, but if the error is session expiration my onFailure method is never called and wrapping the sforce.apex.execute method in a try/catch block doesn't seem to stop the error from coming to the top.

 

Is there any graceful way to handle session expiration in the ajax toolkit, or am I stuck with the nice long and ugly default session epxiration error?