Add function for catching all client exceptions