Reputation: 1429
In the old legacy C driver, I had all of my transactions wrapped in a loop to reconnect and try a second time on dropped connection (MONGO_IO_ERROR) or other unidentified errors. Is this still necessary with the new driver, or does it handle reconnect internally? I could not find any documentation on the bson_error_t. I guess this will generally contain error codes returned by mongodb, e.g., like duplicate insertion, that were available with getlasterror command in legacy C driver? Is there a list of common ones?
Upvotes: 3
Views: 188