While the script should detect the error and abort, you can't hold it responsible for something on your end that is preventing the package from being found. This is what I get when I run the same command --
sudo apt search redis-server
Sorting... Done
Full Text Search... Done
golang-github-stvp-tempredis-dev/bionic,bionic 0.0~git20160122.0.83f7aae-1 all
Go package to start and stop temporary redis-server processes
libtest-redisserver-perl/bionic,bionic 0.21-1 all
redis-server runner for tests
python-hiredis/bionic 0.2.0-3 amd64
redis protocol reader for Python 2.X using hiredis
python3-hiredis/bionic 0.2.0-3 amd64
redis protocol reader for Python using hiredis
redis/bionic,bionic 5:4.0.9-1 all
Persistent key-value database with network interface (metapackage)
redis-server/bionic,now 5:4.0.9-1 amd64 [installed]
Persistent key-value database with network interface