MCPcopy
hub / github.com/keploy/keploy / errorReturnParser

Function errorReturnParser

pkg/agent/proxy/v2_integration_test.go:290–293  ·  view source on GitHub ↗

-------- Error-return parser -------- errorReturnParser reads one client chunk, then returns a non-nil error without panicking. Mirrors the path real V2 parsers take when they hit a decode failure (invalid Content-Length, gzip header mismatch, malformed wire frame, etc.). The supervisor must classif

(_ context.Context, sess *supervisor.Session)

Source from the content-addressed store, hash-verified

288// forwarding bytes end-to-end — same invariant the panic test
289// asserts, but for the much more common error-return path.
290func errorReturnParser(_ context.Context, sess *supervisor.Session) error {
291 _, _ = sess.ClientStream.ReadChunk()
292 return errParserDecode{}
293}
294
295type errParserDecode struct{}
296

Callers

nothing calls this directly

Calls 1

ReadChunkMethod · 0.80

Tested by

no test coverage detected