Catch a connection failure if you can't get the last error from shard.

Should fix #280