devicehub: add error handling when waiting idhub
This commit is contained in:
parent
2ff630f212
commit
02a69e6994
|
@ -120,8 +120,12 @@ END
|
||||||
|
|
||||||
# wait until idhub api is prepared to received requests
|
# wait until idhub api is prepared to received requests
|
||||||
wait_idhub() {
|
wait_idhub() {
|
||||||
|
echo "Start waiting idhub API"
|
||||||
while true; do
|
while true; do
|
||||||
result="$(curl -s "${url}" | jq -r .error)"
|
result="$(curl -s "${url}" \
|
||||||
|
| jq -r .error \
|
||||||
|
|| echo "Reported errors, idhub API is still not ready")"
|
||||||
|
|
||||||
if [ "${result}" = "Invalid request method" ]; then
|
if [ "${result}" = "Invalid request method" ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue