Refactor handle_funding_created to wrapper error handling function