Added AppError type to support error interface, updated base controller to serve AppError type