abpframework / abpframework/abp
Improvements on uow middleware & fail cases
@maliming is already working on this.
Since Oct 20, 2022.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 3.7k
- Avg merge
- 15h 32m
- Merged PRs (30d)
- 106
Description
Related to https://github.com/abpframework/abp/issues/8740
UnitOfWork middleware can not return a fail response when there is an error on saving changes or completing the transaction. For the "saving changes" part, I've done with https://github.com/abpframework/abp/commit/045c5e617d1086af34045154637cf9585ae232c6. However, in rare cases, we can still have issues while completing the transaction.
We can drop usage of UOW middleware which solves the problem. However, in this case, the transaction becomes action scoped (or page handler scoped). We can not create a scope that covers multiple middlewares. As a result, there is no way to include audit logging into the transaction, which can be important for some companies. For audit logging, we can implement creating audit scope and saving in action/page filters (just like we did in audit log interceptor because we had need for blazor server). This mostly solves the audit logging problem - but yes, we can't save request to other middlewares in that case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.