Better errors from protocol parser