DuendeSoftware / IdentityServer

The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
https://duendesoftware.com/products/identityserver
Other
1.45k stars 337 forks source link

EF: Consider handling OperationCanceledException instead of TaskCanceledException in UnhandledExceptionLoggingFilter #1587

Open RolandGuijt opened 2 weeks ago

RolandGuijt commented 2 weeks ago

OperationCanceledException could be the more appropriate exception to check for because some APIs just raise that.

See also: https://blog.stephencleary.com/2022/03/cancellation-3-detecting-cancellation.html#:~:text=And%20since%20TaskCanceledException%20derives%20from,Catch%20OperationCanceledException%20instead

And: https://github.com/DuendeSoftware/Support/issues/1377