Sfoglia il codice sorgente

fix regex of matching hetzner dns api error responses

Lindsay Zhou 9 mesi fa
parent
commit
6c555cb666
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      dnsapi/dns_hetzner.sh

+ 1 - 1
dnsapi/dns_hetzner.sh

@@ -212,7 +212,7 @@ _get_root() {
 _response_has_error() {
   unset _response_error
 
-  err_part="$(echo "$response" | _egrep_o '"error":{[^}]*}')"
+  err_part="$(echo "$response" | _egrep_o '"error":\{[^\}]*\}')"
 
   if [ -n "$err_part" ]; then
     err_code=$(echo "$err_part" | _egrep_o '"code":[0-9]+' | cut -d : -f 2)