Whenever we are showing examples, they should follow best practices.  There is no other place where developers could learn about the intended behavior and best practices.  Therefore, developers will interpret these example snippets as "the way it is supposed to work."

When a CAPTCHA was not solved correctly, then a new CAPTCHA should be shown to the end-user to try again.  The first CAPTCHA solution might have been wrong, because characters were unreadable or not interpreted correctly.  An implementation that straight-out rejects a post due to an incorrectly solved CAPTCHA is wrong.