Skip to content

Commit c591e27

Browse files
committed
misc: improve log messages for version fetch failures
1 parent 77b3ee5 commit c591e27

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ function try_update() {
1717
echo "Probe version successfully fetched from jsDelivr API."
1818
latestVersion=$(jq -r ".version" <<<"${response}" | sed 's/v//')
1919
else
20-
echo "Probe version check failed. Trying raw.githubusercontent.com..."
20+
echo "Failed to fetch the version info from jsDelivr API. Trying GitHub API..."
2121
response=$(curl --max-time 40 --retry 3 --retry-max-time 120 --retry-all-errors -XGET -Lf -sS "https://api.github.com/repos/jsdelivr/globalping-probe/releases/latest")
2222

2323
# Check if the fallback curl succeeded AND returned a non-empty response
2424
if [ $? == 0 ] && [ -n "$response" ]; then
25-
echo "Probe version successfully fetched from GitHub."
25+
echo "Probe version successfully fetched from GitHub API."
2626
latestVersion=$(jq -r ".tag_name" <<<"${response}" | sed 's/v//')
2727
else
28+
echo "Failed to fetch the version info from GitHub API. All methods failed. Exiting."
2829
return
2930
fi
3031
fi

0 commit comments

Comments
 (0)