check proper value for error and return a hopefully useful message