closing the issue. you can always reopen it.
Thank you @maliming. it'll be useful for others as well.
This is EF Core default behaviour.
When there's DbUpdateException, the default exception handler only handles An internal error occurred during your request.
If you need the details of the exception you need to cast it, or you need to catch DbUpdateException.
Check out this https://stackoverflow.com/questions/22490842/finding-the-reason-for-dbupdateexception
try
{
await _orgContactRepository.InsertAsync(data, false);
}
catch (DbEntityValidationException vex)
{
var exception = HandleDbEntityValidationException(vex);
throw new UserFriendlyException("Ooppps! This record is not valid..");
}
catch(DbUpdateException dbu)
{
var builder = new StringBuilder("A DbUpdateException was caught while saving changes.");
try
{
foreach (var result in dbu.Entries)
{
builder.AppendFormat("Type: {0} was part of the problem. ", result.Entity.GetType().Name);
}
}
catch (Exception e)
{
builder.Append("Error parsing DbUpdateException: " + e.ToString());
}
string message = builder.ToString();
return new Exception(message, dbu);
throw new UserFriendlyException("Ooppps! Error occured while saving the record.");
}
thanks for your feedback.
Whoo! nice shot :)
What's the stacktrace? You haven't mentioned about the exception
I remember the same thing happened for a customer. He couldn't use HTTPS in the container.
We have fixed the The specified transaction is not associated with the current connection exception.
See the related commit => https://github.com/abpframework/abp/issues/8049
it'll be ready next version.
On the other hand, we have found another issue. In this issue INSERT/UPDATE transactions throws Sequence contains no elements error. This bug is fixed by Devart Team. See the following links:
this is a bit out of ABP project context. but to help you; you need to authorize the Swagger client in order to make an authenticated request