MCPcopy
hub / github.com/grpc/grpc-go / finalizeNonGRPCStatus

Method finalizeNonGRPCStatus

internal/transport/client_stream.go:75–78  ·  view source on GitHub ↗

finalizeNonGRPCStatus builds the terminal status by appending the collected response body to the original non-gRPC status message.

()

Source from the content-addressed store, hash-verified

73// finalizeNonGRPCStatus builds the terminal status by appending the collected
74// response body to the original non-gRPC status message.
75func (s *ClientStream) finalizeNonGRPCStatus() *status.Status {
76 msg := fmt.Sprintf("%s\ndata: %q", s.nonGRPCStatus.Message(), s.nonGRPCDataBuf)
77 return status.New(s.nonGRPCStatus.Code(), msg)
78}
79
80// handleNonGRPCData collects non-gRPC body from the given data frame.
81// It returns non-nil value when the stream should be closed with it.

Callers 2

handleNonGRPCDataMethod · 0.95
operateHeadersMethod · 0.80

Implementers 3

clientStreamstream.go
okStreaminternal/xds/httpfilter/fault/fault.go

Calls 3

NewFunction · 0.92
MessageMethod · 0.80
CodeMethod · 0.80

Tested by

no test coverage detected