Skip to content

handleForwardResponseOptions not called by DefaultHTTPError #1064

Closed
@movsb

Description

handleForwardResponseOptions is called by both ForwardResponseStream and ForwardResponseMessage but not DefaultHTTPError. Is there a reason why? Is it intended?

FYI: handleForwardResponseServerMetadata, handleForwardResponseTrailerHeader and handleForwardResponseTrailer are called by ForwardResponseMessage and DefaultHTTPError.

Steps you follow to reproduce the error:

  1. Register a forwardResponseOption:
mux := runtime.NewServeMux(runtime.WithForwardResponseOption(myCallback))
  1. Return an error from GRPC handler.

What did you expect to happen instead:

myCallback gets called on all response-related functions like ForwardResponseMessage, ForwardResponseStream and DefaultHTTPError.

What's your theory on why it isn't working:

Metadata

Assignees

No one assigned

    Labels

    breaking changeWill require a major version increment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions