public async Task <IHttpActionResult> Order(int menuItem) { try { // so much cleaner and DRY var orderId = await pizzaOrderService.OrderMenuItemAsync(menuItem); return(Created("http://mypizza.com/orders/" + orderId, orderId)); } catch (Exception ex) //todo: add exception filter { loggingService.LogError(ex.Message); return(BadRequest("Oops, no pizza for you.")); } }