add test and more helpful error message
Merge pull request #2504 from lavalamp/fix3

add test and more helpful error message