migration: Improve migration thread error handling