As you can see, there is no way to call GenServer.reply with a non-pid.
However, this is possible when calling send directly. This is for instance used when working with named processes. And in those cases, if the process that the name used to refer to is no longer around (or did not start up yet), that is when send will encounter the mentioned error.
I got that send would raise error when it has unregistered name error, e.g. send(:no_exist, nil).
I did a bit search on git and found that is_pid guard is added at later time here. I guess try block is necessary before is_pid guard but it’s not necessary after is_pid guard added.
But if we know that pid is a pid type (with guard), would send(pid, anything) ever raise an error in other corner case?