issue #24607: make sure we hit the proper error message
Merge pull request #1883 from shackbarth/24607

issue #24607: make sure we hit the proper error message