updated app controller exception code