From 42a9058cec80d8578a1d4b884cb686384b4d16fc Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Thu, 12 Sep 2024 10:31:58 -0600 Subject: [PATCH] Don't whack the error reference --- internal/cmd/restorer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cmd/restorer.go b/internal/cmd/restorer.go index acf042d..fc05e32 100644 --- a/internal/cmd/restorer.go +++ b/internal/cmd/restorer.go @@ -228,9 +228,9 @@ func (r *restorer) commitStream(ctx context.Context, bulkImportClient v1.Experim canceled, cancelErr := isCanceledError(ctx.Err(), err) unknown := !retryable && !conflict && !canceled && err != nil - intExpectedLoaded, err := safecast.ToInt64(expectedLoaded) - if err != nil { - return err + intExpectedLoaded, castErr := safecast.ToInt64(expectedLoaded) + if castErr != nil { + return castErr } intNumBatches := int64(len(batchesToBeCommitted))