#16 Refactoring error retry handling