app an controller error handling