Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/redis_client/connection_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def call_pipelined(commands, timeouts)
timeout = timeouts && timeouts[index]
result = read(timeout)
@pending_reads -= 1

# A multi/exec command can return an array of results.
# An error from a multi/exec command is handled in Multi#_coerce!.
if result.is_a?(Error)
result._set_command(commands[index])
exception ||= result
Expand Down
2 changes: 2 additions & 0 deletions test/shared/redis_client_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,15 @@ def test_wrong_type
pipeline.call("SISMEMBER", "str", "member")
end
end
assert_equal ["SISMEMBER", "str", "member"], error.command
assert_includes error.message, "WRONGTYPE Operation against a key holding the wrong kind of value"

error = assert_raises RedisClient::CommandError do
@redis.multi do |transaction|
transaction.call("SISMEMBER", "str", "member")
end
end
assert_equal ["SISMEMBER", "str", "member"], error.command
assert_includes error.message, "WRONGTYPE Operation against a key holding the wrong kind of value"
end

Expand Down