It would be a simple fix; most search engine spider's have various
unique user agents. You could simply have your script check to see if the visitor's user agent is a search engine spider agent, and if so skip the error
Bit late here, I'll come online tomorrow afternoon and if you haven't figured it out or if nobody has posted I'll write you up a small section of code. Unfortunately I don't use Wordpress so you will have to adapt it a bit.