mirror of
https://github.com/JonasunderscoreJones/dayz-linux-gui-launcher.git
synced 2025-10-23 00:09:19 +02:00
fix: error logging of failed API query
This commit is contained in:
parent
9215d39aa3
commit
d27d255e26
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ if [[ -n "${SERVER}" ]]; then
|
|||
msg "Querying API for server: ${SERVER%:*}:${PORT}"
|
||||
query="$(sed -e "s/@ADDRESS@/${SERVER%:*}/" -e "s/@PORT@/${PORT}/" <<< "${API_URL}")"
|
||||
debug "Querying ${query}"
|
||||
response="$(curl "${API_PARAMS[@]}" "${query}" || err "Error while querying API")"
|
||||
response="$(curl "${API_PARAMS[@]}" "${query}")"
|
||||
[[ $? > 0 ]] && err "Error while querying API"
|
||||
debug "Parsing API response"
|
||||
jq -e ".mods[]" 2>&1 >/dev/null <<< "${response}" || err "Missing mods data from API response"
|
||||
INPUT+=( $(jq -r ".mods[] | select(.app_id == ${DAYZ_ID}) | .id" <<< "${response}") )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue