Skip to content

[BUG] EVALSHA's documented NOSCRIPT error return value differs from implementation? #9286

@alexweej

Description

@alexweej

Describe the bug

The documentation for EVALSHA, in particular its NOSCRIPT error response, is inconsistent with the implementation.

In https://redis.io/commands/eval

evalsha ffffffffffffffffffffffffffffffffffffffff 0
(error) `NOSCRIPT` No matching script. Please use [EVAL](/commands/eval).

But in practice we see

ourdb:DEV> evalsha ffffffffffffffffffffffffffffffffffffffff 0
(error) NOSCRIPT No matching script. Please use EVAL.

Notice that the error string is prefixed with NOSCRIPT , not enclosed in backticks.

Given that the documentation does specifically call out the fact that client libraries can use EVALSHA and catch the NOSCRIPT error specifically, we seek absolute clarity on detecting this error condition.

To reproduce

Call evalsha, compare with docs

Expected behavior

Docs match actual behaviours

Additional information

> info
# Server
redis_version:5.0.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:3993664ffbfda963
redis_mode:standalone
os:Linux 3.10.0-957.35.2.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:7.3.1
process_id:18684
run_id:c5f95d16aa6f9ad918f4c6b445f313754ae5f868
tcp_port:30866
uptime_in_seconds:608812
uptime_in_days:7
hz:10
configured_hz:10
lru_clock:171448

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions