Handle "not master" / "recovering" errors from writes

JAVA-1274