ABP Framework version: v5.1.2 UI type: Angular DB provider: EF Core Identity Server Separated (Angular)
Hello
I use the class implementing IAuditingStore
interface to catch all the errors in our application. I would like to use this class as a proxy: for this I inject ABP object implementing IAuditLogRepository
interface.
I've faced the issue while trying to save an error (It looks like task has been canceled by ABP logic) - see the picture attached:
This logic used to work well on the previous versions of ABP framework. What is wrong now?
8 Answer(s)
-
0
Hi, thanks for the explanation. I'll check and write you back asap.
-
0
I've created an application with v5.0 and implemented the
IAuditingStore
interface and save records by using theIAuditLogRepository
. Then, upgraded the application to v5.1.2 and I still could save records to the database and didn't face with any problems.Can you share your class that implements the
IAuditingStore
? -
0
This issue can be reproduced when you are trying to save some error (the exception which happens in your application). Have you reproduced this case?
-
0
This issue can be reproduced when you are trying to save some error (the exception which happens in your application). Have you reproduced this case?
Yes, I tried in that case but couldn't reproduce the problem. If it's possible can you share your class that implements the
IAuditingStore
? -
0
Unfortunately, I cannot share the source code, but I'll try to describe what I've found out.
I've revealed that the issue happens when I am trying to modify
HttpContext
response stream. I have to return custom JSON response when my application throws an exception. For this goal, the middleware has been created. It analyzesHttpContext
response headers and replaces this response stream - when an exception happens - with custom JSON response. The middleware usesIAuditingManager
to collect the information about errors.Do you have any idea how modifying
HttpContext
response stream may affectIAuditLogRepository
logic? -
0
Unfortunately, I cannot share the source code, but I'll try to describe what I've found out.
I've revealed that the issue happens when I am trying to modify
HttpContext
response stream. I have to return custom JSON response when my application throws an exception. For this goal, the middleware has been created. It analyzesHttpContext
response headers and replaces this response stream - when an exception happens - with custom JSON response. The middleware usesIAuditingManager
to collect the information about errors.Do you have any idea how modifying
HttpContext
response stream may affectIAuditLogRepository
logic?Hi, actually it shouldn't affect the repository, but I'll check and write you back asap.
-
0
Your bot has closed these ticket again. How to prevent this?
-
0
hi @alexander
Unfortunately, I cannot share the source code
Please use the template project to reproduce the problem and share it liming.ma@volosoft.com