public async Task RemoveBranch(string branchName) { try { await _assetsStorage.DeleteBranch(branchName); } catch (BranchException ex) { var resp = new HttpResponseMessage(System.Net.HttpStatusCode.Conflict) { Content = new StringContent(ex.Message), ReasonPhrase = ex.Message }; throw new HttpResponseException(resp); } catch (ElasticsearchException) { var resp = new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError) { Content = new StringContent($"Internal data base error please check server logs"), ReasonPhrase = $"Internal data base error please check server logs" }; throw new HttpResponseException(resp); } }