HSEARCH-1470 Improving error message for HSEARCH000131 and adding explicit tests