Bitcoin Core makes legacy wallet migration fall back to the original wallet on any failure
Bitcoin Core merged pull request 34193 on Wednesday 25 November, a change that makes the migration of legacy wallets more robust when something goes wrong. The author, furszy, describes it as the result of finding more edge cases after two earlier pull requests, 34156 and 34176, and states the goal plainly: failures should be handled in a controlled way, so that the process can restore the original wallet automatically instead of leaving the user to repair it by hand.
The pull request covers three cases. The first is inside the main migration routine, DoMigration, where some methods could throw exceptions and abort the process abruptly. In the graphical interface that meant a crash, elsewhere a generic exception. The migration now catches those errors and returns them in an orderly way, which is what allows the original wallet to be restored automatically.

The second case is a wallet that sits in a read-only directory. Trying to migrate it used to throw a filesystem exception that skipped the cleanup step. Now the migration fails with a clear error message and restores the original wallet.
The third case changes the order of operations. Until now, any failure while the wallet was being converted to SQLite, in the step called MigrateToSQLite, required manual intervention by the user. After the change, the original wallet database stays untouched, and it is only updated once creation of the SQLite database has fully succeeded.
The effect for users is about what a failed migration leaves behind rather than about new functionality. With this change the expected outcome of a failure is the wallet the user started with, not a half-converted one.