catch errors in comm callbacks