Commit b5b7c9e2 authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Also check for curl failure in driver

parent f5093250
...@@ -96,7 +96,10 @@ ghostAction() { ...@@ -96,7 +96,10 @@ ghostAction() {
else else
local data="{\"type\": \"$action\", \"droplet\": $vps}" local data="{\"type\": \"$action\", \"droplet\": $vps}"
fi fi
response=$(curl -sS -X POST -H "Authorization: Bearer $apiToken" "$url" -d "$data") if ! response=$(curl -sS -X POST -H "Authorization: Bearer $apiToken" "$url" -d "$data")
then
exitWithFailure "$response"
fi
# Record the complete body from the HTTP response in the log. # Record the complete body from the HTTP response in the log.
debug "output: " debug "output: "
debug $(jq '.' <<<"$response") debug $(jq '.' <<<"$response")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment