public async Task <IActionResult> DiningCheckIn([FromRoute] string venueId, [FromRoute] string areaId, [FromBody] DiningCheckInRequest checkIn) { try { // Check-in the group to the dining area. await _patronService.SubmitDiningCheckIn(venueId, areaId, checkIn); // Log the check-in. _logger.LogInformation("Dining check-in. [vId: {venueId}, aId: {areaId}, tN: {tableNumber}, count: {patronCount}]", venueId, areaId, checkIn.TableNumber, checkIn.People.Count); // Return empty OK status. return(Ok()); } catch (VenueNotFoundException e) { // Error: Venue could not be found. _logger.LogInformation(e, "Venue could not be found to complete dining check-in. [vId: {venueId}]", venueId); return(BadRequest(APIError.VenueNotFound())); } catch (AreaNotFoundException e) { // Error: Are could not be found. _logger.LogInformation(e, "Could not find a dining area in specified venue. [vId: {venueId}, aId: {areaId}]", venueId, areaId); return(BadRequest(APIError.AreaNotFound())); } catch (ServiceNotFoundException e) { // Error: There is no active service in the specified area. _logger.LogInformation(e, "Venue area does not have an active service. [vId: {venueId}, aId: {areaId}]", venueId, areaId); return(BadRequest(APIError.AreaHasNoService())); } catch (Exception e) { // Error: Unknown error. _logger.LogError(e, "Dining check-in failed. [vId: {venueId}, aId: {areaId}, tN: {tableNumber}, count: {patronCount}]", venueId, areaId, checkIn.TableNumber, checkIn.People.Count); return(BadRequest(APIError.UnknownError())); } }