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

bug: ResponseTimeService not work when an exception occurs #663

Open
biluohc opened this issue Jul 1, 2022 · 0 comments
Open

bug: ResponseTimeService not work when an exception occurs #663

biluohc opened this issue Jul 1, 2022 · 0 comments
Assignees

Comments

@biluohc
Copy link

biluohc commented Jul 1, 2022

Summary

The Service not work when an exception occurs, such as 40X or 50X.

Steps To Reproduce The Bug

$ curl -I 0.0.0.0:8000/404                                                                                                  
HTTP/1.1 200 OK
content-type: text/html
vary: Accept-Encoding
content-length: 569
date: Fri, 01 Jul 2022 15:10:59 GMT

Expected Behavior

The Service should work for all status code.

Suggested Solution(s)

When a service or resource behind a service throws an exception,
it should also run the runAfterResource of this service after calling ErrorHandler.

Otherwise, middlewares such as Logger or ResponseTime will not work when exception occurs.

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

Successfully merging a pull request may close this issue.

2 participants