better handling of return codes in the libshardcache communication protocol