catch errors during packet parsing