CLN GH22985 Fixed interpolation with object error message
- [x] closes #22985
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

It looks like the problem with #22985 is mostly the mismatch between the input trigger and the error message, so this is just a tiny hotfix. 