add protocol buffer error support