check if it's not empty first

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-28 03:01:40 +00:00
parent ef31a1ebbf
commit 31b5fb94c8
+4
View File
@@ -243,6 +243,10 @@ get_api_status() {
jq -r '.status.code, .status.message'
)
if ! [[ $api_status ]]; then
return 1
fi
if (( api_status >= 400 )); then
return 1
fi