MCPcopy Index your code
hub / github.com/coder/coder / findHTTP2StreamError

Function findHTTP2StreamError

coderd/x/chatd/chaterror/classify.go:312–322  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

310}
311
312func findHTTP2StreamError(err error) (http2.StreamError, bool) {
313 var streamErr http2.StreamError
314 if errors.As(err, &streamErr) {
315 return streamErr, true
316 }
317 var streamErrPtr *http2.StreamError
318 if errors.As(err, &streamErrPtr) && streamErrPtr != nil {
319 return *streamErrPtr, true
320 }
321 return http2.StreamError{}, false
322}
323
324func isPeerHTTP2StreamError(streamErr http2.StreamError) bool {
325 return streamErr.Cause != nil && streamErr.Cause.Error() == http2PeerResetCause

Callers 1

classifyHTTP2StreamResetFunction · 0.85

Calls 1

AsMethod · 0.80

Tested by

no test coverage detected