hummingbird icon indicating copy to clipboard operation
hummingbird copied to clipboard

HTTPResponseError is now a ResponseGenerator

Open sidepelican opened this issue 1 year ago • 2 comments

After this PR, https://github.com/hummingbird-project/hummingbird/pull/484

This PR has made HTTPResponseError a confusing entity. Although status and headers are included as requirements, but there are no meaningful usages. It is no different from ResponseGenerator.

To avoid confusion, we should either remove it, or provide a default conformance to ResponseGenerator.

sidepelican avatar Jul 03 '24 14:07 sidepelican

status and headers are used in both the tracing and metrics middleware, so we can't just conform to ResponseGenerator as we need this additional information.

adam-fowler avatar Jul 03 '24 14:07 adam-fowler

Sorry, I missed the usage in TracingMiddleware. My thoughts are written here: https://github.com/hummingbird-project/hummingbird/pull/502#issuecomment-2207866751

sidepelican avatar Jul 04 '24 02:07 sidepelican