add rescue from in appcontroller