If that worked at all I wouldn't recommend it. That would, hypothetically, require a significant overhead in processing and connection management.
The solution really depends on what you're trying to prevent:
* Massive server issues that manifest as 50x or other errors (something that would warrant taking the server out of rotation) - would be best served by a strong monitor.
* Transient errors like 500s that may happen because of momentary glitches in server processing - may be best suited to a variant of the previously mentioned iRule, where status codes are caught and new servers are tried (HTTP::retry) until either one of them answers with a good response or you run out of servers.
* Transient errors like 404s that may happen because of a specific user request (and not a server issue) - may be best suited to an iRule that simply catches the 404 and returns some generic content in its place.