From c41f021306ce115770a5cc17a1e574ac89cf9c7c Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 12 Dec 2024 14:00:53 -0500 Subject: [PATCH] Add context to an error message Signed-off-by: Nalin Dahyabhai --- copier/copier.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copier/copier.go b/copier/copier.go index c742601ea06..962ce17b40c 100644 --- a/copier/copier.go +++ b/copier/copier.go @@ -711,7 +711,7 @@ func copierWithSubprocess(bulkReader io.Reader, bulkWriter io.Writer, req reques return nil, fmt.Errorf("%v: %w", step, err) } if err = encoder.Encode(req); err != nil { - return killAndReturn(err, "error encoding request for copier subprocess") + return killAndReturn(err, "error encoding work request for copier subprocess") } if err = decoder.Decode(&resp); err != nil { if errors.Is(err, io.EOF) && errorBuffer.Len() > 0 { @@ -720,7 +720,7 @@ func copierWithSubprocess(bulkReader io.Reader, bulkWriter io.Writer, req reques return killAndReturn(err, "error decoding response from copier subprocess") } if err = encoder.Encode(&request{Request: requestQuit}); err != nil { - return killAndReturn(err, "error encoding request for copier subprocess") + return killAndReturn(err, "error encoding quit request for copier subprocess") } stdinWrite.Close() stdinWrite = nil