I was attempting to run decpac generate (https://github.com/rendaw/decpac) as root when I discovered this.
$ pacman -Qm
$ echo $? # grab the exit status
1
I tried this on a new install and saw the same issue.
Pacman -Q and -S operations return 1 when no results are found.
Thanks nous! I submitted an issue for the decpac maintainer here (https://github.com/rendaw/decpac/issues/7).