devicehub: add error handling when waiting idhub

This commit is contained in:
pedro 2025-01-30 08:59:01 +01:00
parent 2ff630f212
commit 02a69e6994

View file

@ -120,8 +120,12 @@ END
# wait until idhub api is prepared to received requests
wait_idhub() {
echo "Start waiting idhub API"
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
break
else