Skip to content

Commit

Permalink
fix regex of matching hetzner dns api error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayzhou committed Jan 13, 2025
1 parent 0ae8027 commit 67ce457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnsapi/dns_hetzner.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67ce457

Please sign in to comment.