mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-26 17:26:27 +00:00
fix/extend sendJson error handling
This commit is contained in:
parent
b189191b85
commit
9b138eecbd
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.96-dev3-23-g02e776c
|
#### $$VERSION$$ v0.96-dev3-24-gb189191
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -379,7 +379,8 @@ sendJsonResult(){
|
|||||||
else
|
else
|
||||||
if [ "${res}" != "" ]; then
|
if [ "${res}" != "" ]; then
|
||||||
BOTSENT[ERROR]="$(JsonGetValue '"error_code"' <<< "${3}")"
|
BOTSENT[ERROR]="$(JsonGetValue '"error_code"' <<< "${3}")"
|
||||||
BOTSENT[DESCRIPTION]="$(JsonGetValue '"description"' <<< "${3}")"
|
BOTSENT[DESCRIPTION]="$(JsonGetString '"description"' <<< "${3}")"
|
||||||
|
BOTSENT[RETRY]="$(JsonGetValue '"parameters","retry_after"' <<< "${3}")"
|
||||||
else
|
else
|
||||||
BOTSENT[ERROR]="999"
|
BOTSENT[ERROR]="999"
|
||||||
BOTSENT[DESCRIPTION]="Timeout or broken/no connection"
|
BOTSENT[DESCRIPTION]="Timeout or broken/no connection"
|
||||||
|
Loading…
Reference in New Issue
Block a user