(maint) Add invalid version number to error msg

Prior to this commit the error message for invalid versions did not
return the version number. This commit adds the invalid version number
to the message.