Fix a couple of error messages and tests for them

Andrew Dunstan <andrew@dunslane.net>

Commit: 2ef57908067ab29c22ae13f7775fe2afc330e8f6
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2025-04-04T21:07:45Z
Releases: 18.0
Fix a couple of error messages and tests for them

oversights in 1495eff7bdb and 289f74d0cb2. Mea culpa.

Files