public IHttpActionResult Destroy(string handle) { var container = containerService.GetContainerByHandle(handle); if (container != null) { containerService.DestroyContainer(handle); return(Ok()); } return(NotFound()); }
public IHttpActionResult Destroy(string handle) { var container = containerService.GetContainerByHandleIncludingDestroyed(handle); if (container != null) { try { containerService.DestroyContainer(handle); } catch (Exception e) { logger.Error("Cannot delete container", new Dictionary <string, object> { { "handle", handle }, { "exception", e }, }); throw; } return(Ok()); } return(NotFound()); }