MCPcopy Create free account
hub / github.com/imroc/req / connError

Method connError

internal/http2/frame.go:590–593  ·  view source on GitHub ↗

connError returns ConnectionError(code) but first stashes away a public reason to the caller can optionally relay it to the peer before hanging up on them. This might help others debug their implementations.

(code ErrCode, reason string)

Source from the content-addressed store, hash-verified

588// to the peer before hanging up on them. This might help others debug
589// their implementations.
590func (h2f *Framer) connError(code ErrCode, reason string) error {
591 h2f.errDetail = errors.New(reason)
592 return ConnectionError(code)
593}
594
595// checkFrameOrder reports an error if f is an invalid frame to return
596// next from ReadFrame. Mostly it checks whether HEADERS and

Callers 2

ReadFrameMethod · 0.95
checkFrameOrderMethod · 0.95

Calls 1

ConnectionErrorTypeAlias · 0.85

Tested by

no test coverage detected