Better error handling in protobuf parsing