Enhanced to cancel a session for a service error.