From 5d265eaf38d7f35fc181239d1023c0fb4cee0f3b Mon Sep 17 00:00:00 2001 From: Jonas Meier Date: Tue, 11 Jun 2024 17:29:54 +0200 Subject: [PATCH] fix: cmd error in pipelines When a command in a pipeline produces an error, only this single command should fail and return an error. However the currently implemented behavior is that the complete pipeline execution fails, which isn't resembling the behavior from Redis. --- mock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock.go b/mock.go index 9b862fd..b522009 100644 --- a/mock.go +++ b/mock.go @@ -113,7 +113,7 @@ func (h redisClientHook) ProcessPipelineHook(_ redis.ProcessPipelineHook) redis. err = h.returnErr } if err != nil { - return err + cmd.SetErr(err) } } return nil