Fix typo and add the error code to the message.  Fixes #8431.