ERR: Better error reporting with .transform and an invalid output per GH 10165
- [ ] closes #10165
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry

thanks @tomowind 
