wifiap: handle errors better