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() {
else
local data="{\"type\": \"$action\", \"droplet\": $vps}"
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.
debug "output: "
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