Whenever a server error prevents the AJAX viewer from updating, there is no feedback indicating that a problem occurred. The map just stops working. This can be really confusing.
Most significantly, whenever a session expires, the viewer should report that fact to the user.
Also, the viewer API should have a hook for error handling, including the ability to override the default error handler. One example use for this feature might be some custom code for "rebooting" a session, or better display of error message.
This problem may extend to the DWF viewer as well.