Skip to content

bug: ResponseTimeService not work when an exception occurs #663

@biluohc

Description

@biluohc

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions