Skip to content

Generated client cannot handle http2 GOAWAY #3725

Open
@duckbrain

Description

@duckbrain

Using the generated goa client, I've been getting this error somewhat regularly while under load.

http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error

In http.NewRequestFromContext, there's special logic to assign GetBody when the passed in body is a *bytes.Buffer. This avoids that issue. Goa passes nil and later assigns a request body via goa.design/goa/v3/http.RequestEncoder, which does not assign GetBody. It should be updated to return an Encoder that assigns r.GetBody.

Metadata

Metadata

Assignees

No one assigned

    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