See L358. We need to set a default fun that does nothing or do a case in L358, when the on_reply function could be undefined. If you prefer the 'case' option, is also fine.