Unable to delete country (Commerce)
# help-with-umbraco
b
I currently have two countries for my store. "United Kingdom" and "Denmark", I don't seem to be able to delete United Kingdom, as I get a concurrency error whatever that means. I have successfully removed the GBP currency, and I also feel like I've removed any references to United Kingdom in the store, company, etc. but I cannot seem to delete it. https://cdn.discordapp.com/attachments/1306822787939307531/1306822788568322088/image.png?ex=67381110&is=6736bf90&hm=463c5055f79d8ea879fba16bee0c555001eb18e635028c911b31b480c58b6e65&
This is the stacktrace:
Copy code
at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.Execute[TResult](Func`1 operation, Func`1 verifySucceeded)

   at Umbraco.Commerce.Core.UmbracoCommerceUnitOfWorkProvider.Execute(IUnitOfWorkOptions options, Action`1 action)

   at Umbraco.Commerce.Core.Services.CountryService.DeleteCountry(Guid id)

   at Umbraco.Commerce.Core.Services.EntityService.DeleteEntity(String entityType, Guid entityId)

   at Umbraco.Commerce.Cms.Web.Controllers.UmbracoCommerceEntityController.DeleteEntity(String entityType, Guid entityId)

   at lambda_method4866(Closure, Object, Object[])

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
s
If there is a payment method/currency/anything else that is allowed/default for that country, you cannot delete the country (we had the issue before). It would be helpful to get more meaningful error messages or that a warning would be shown with the relations
3 Views