MCPcopy
hub / github.com/connectrpc/connect-go / Meta

Method Meta

error.go:239–244  ·  view source on GitHub ↗

Meta allows the error to carry additional information as key-value pairs. Protocol-specific headers and trailers may be removed to avoid breaking protocol semantics. For example, Content-Length and Content-Type headers won't be propagated. See the documentation for each protocol for more datails.

()

Source from the content-addressed store, hash-verified

237// headers and the protocol-specific trailers (either HTTP trailers or in-body
238// metadata).
239func (e *Error) Meta() http.Header {
240 if e.meta == nil {
241 e.meta = make(http.Header)
242 }
243 return e.meta
244}
245
246func (e *Error) detailsAsAny() []*anypb.Any {
247 anys := make([]*anypb.Any, 0, len(e.details))

Callers 10

TestErrorNilUnderlyingFunction · 0.95
TestGetNotModifiedFunction · 0.95
TestServerFunction · 0.95
FailMethod · 0.95
FailMethod · 0.95
newHTTPMiddlewareErrorFunction · 0.95
ResponseHeaderMethod · 0.80
ResponseTrailerMethod · 0.80

Calls

no outgoing calls

Tested by 10

TestErrorNilUnderlyingFunction · 0.76
TestGetNotModifiedFunction · 0.76
TestServerFunction · 0.76
FailMethod · 0.76
FailMethod · 0.76
newHTTPMiddlewareErrorFunction · 0.76
ResponseHeaderMethod · 0.64
ResponseTrailerMethod · 0.64