HTTP_STATUS=$(curl -w"%{http_code}"-o>(cat>&3)"${curl_options[@]}""$@")||! echo2 "Error $? while executing 'curl ${curl_options[@]}$@', refer to https://man7.org/linux/man-pages/man1/curl.1.html (EXIT CODES) for more info"||return$?
! echo2 "Error $? while executing 'curl ${curl_options[@]}$@', refer to https://man7.org/linux/man-pages/man1/curl.1.html (EXIT CODES) for more info. Retry $retry_count in 5..."
done||exit$?
# There is some expected 40x error in some API. Caller may set HTTP_IGNORED_ERROR_STATUS_LIST=405,413 to ignore some of them.
[["$HTTP_STATUS"== 40*]]||[["$HTTP_STATUS"== 50*]]&& echo2 "HTTP Error $HTTP_STATUS while sending HTTP request 'curl ${curl_options[@]}$@'. Double-confirm that this API is working with your cookie or token! "&&return 2
return 0
}
...
...
@@ -258,6 +264,7 @@ function cis_wait_for_upload () {
function subcmd_push (){
# No output. TODO: DO NOT release in push. Delete it and modify documents.