updating main controller to demonstrate rejecting a promise on error