Add global success & failure hook