MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / handleSendError

Function handleSendError

cli/cmd/errors.go:10–21  ·  view source on GitHub ↗
(err error, client safeWriteClient, msgType string)

Source from the content-addressed store, hash-verified

8)
9
10func handleSendError(err error, client safeWriteClient, msgType string) error {
11 if err == io.EOF {
12 // we need to get back the original error
13 if _, err := client.CloseAndRecv(); err != nil {
14 if e, ok := status.FromError(err); ok {
15 return fmt.Errorf("write client returned error (%v): %v", msgType, e.Message())
16 }
17 return fmt.Errorf("failed to close and receive write client (%v): %v", msgType, err)
18 }
19 }
20 return fmt.Errorf("failed to send write request (%v): %w", msgType, err)
21}

Callers 4

syncConnectionV3Function · 0.85
migrateConnectionV3Function · 0.85
migrateSummaryTableFunction · 0.85
sendSummaryFunction · 0.85

Calls 2

CloseAndRecvMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected