HomeSoftware Heritage

Fix error handling + add test.