You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I purpose to check Gandi response access denied. In case on bad API key or token, Gandi answer with 403 json.
Without this modification, gad script will try to create a new record.
update() create()
new_record_message=$(get_json_field "message" "$new_record_json")
if echo "$new_record_json" | grep -iE ":403,|access was denied|httpforbidden" >/dev/null 2>&1 ; then
printf "Sorry, access was denied by gandi.\\n"
printf "new_record_json:\\n---\\n%s\\n---\\n\\n" "$new_record_json"
exit 9
fi
check()
record_json=$(rest "GET" "domains/${domain}/records/${1}/${record_type}")
if echo "$record_json" | grep -iE ":403,|access was denied|httpforbidden" >/dev/null 2>&1 ; then
printf "Sorry, access was denied by gandi.\\n"
printf "record_json:\\n---\\n%s\\n---\\n\\n" "$record_json"
exit 9
fi
thanks
The text was updated successfully, but these errors were encountered:
I purpose to check Gandi response access denied. In case on bad API key or token, Gandi answer with 403 json.
Without this modification, gad script will try to create a new record.
update() create()
check()
thanks
The text was updated successfully, but these errors were encountered: