migrate error handling paradigms