I am certain it's not only 11000 — our other error handling code lists atleast 11001 and 12582. Please refer to that, and perhaps also implement the other error code. Can this not reuse some logic from php_mongo_cursor_throw? It looks like a duplication now.