swr: use local variable for ns_errors