Added error to HandlePacket