public async Task <IActionResult> Cancel(Guid id, int facilityId) { try { var booking = await bookingService.FindAsync(facilityId, id); ViewBag.FacilityId = facilityId; return(View(mapper.MapFrom(booking))); } catch (BookingNotFoundException) { return(View("NotFound")); } }
public async Task <Contracts.Models.Booking> FindAsync(string userId, Guid id) { try { return(await breaker.ExecuteAsync(() => innerProxy.FindAsync(userId, id))); } catch (HttpOperationException ex) { throw new RemoteServiceFailedException(ex.StatusCode(), ex); } catch (BrokenCircuitException ex) { throw new RemoteServiceFailedException(ex.StatusCode(), ex); } }