From a523f9793861d8927388f18bb5f2319bbe04c0b8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 10:07:30 +0200 Subject: [PATCH] netwatch-dns: :do ... on-error=... -> :onerror ... do=... --- netwatch-dns.rsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 3da1498..4fa076a 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -118,15 +118,15 @@ } :local Data false; - :do { + :onerror Err { :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ http-header-field=({ "accept: application/dns-message" }) \ url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \ "\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \ "\00\10" . "\00\01") ]) as-value ]->"data"); - } on-error={ - $LogPrint warning $ScriptName ("Request to DoH server failed (network or certificate issue): " . \ - ($DohServer->"doh-url")); + } do={ + $LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \ + " failed: " . $Err); } :if ($Data != false) do={