TAVSERV-338: Ensure that bad inputs are reported properly. Improve some
error messages.