CLN: fix Exception type and tweak message GH5399