Browse Source

fix regex of matching hetzner dns api error responses

pull/6198/head
Lindsay Zhou 3 months ago
parent
commit
6c555cb666
No known key found for this signature in database GPG Key ID: ECBDA6E4719D5816
  1. 2
      dnsapi/dns_hetzner.sh

2
dnsapi/dns_hetzner.sh

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

Loading…
Cancel
Save