Issue #22081:add edit to prevent over application of target apopen

The exception text and error number don't match.