Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not log exception call stacks for cancellations in RequestLoggingMiddleware #372

Open
cremor opened this issue May 13, 2024 · 0 comments

Comments

@cremor
Copy link

cremor commented May 13, 2024

Is your feature request related to a problem? Please describe.
When a client cancels a request the RequestLoggingMiddleware will log the stack trace of the TaskCanceledException.

Describe the solution you'd like
RequestLoggingMiddleware should not log exception strack traces for cancellations.

Describe alternatives you've considered
Maybe make it configurable. But I can't see a reason why anyone would want stack traces for cancellations.

Additional context
Related to #341 but not the same. You might want to log "real" exceptions but cancellation exceptions are always spam.
This could be implemented in the same way as DeveloperExceptionPageMiddlewareImpl or ExceptionHandlerMiddlewareImpl implements it.
It would be a good idea to also fix the status code for cancellations at the same time (related to #344).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants