1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00
This commit is contained in:
downtownallday
2020-06-02 23:27:24 -04:00
parent cde1e84f98
commit ceca4a3cff
2 changed files with 10 additions and 2 deletions

View File

@@ -63,7 +63,13 @@ mgmt_rest() {
[ -z "$REST_HTTP_CODE" ] && REST_HTTP_CODE="000"
if [ $code -ne 0 ]; then
if [ $code -ne 16 -o $REST_HTTP_CODE -ne 200 ]; then
if [ $code -eq 56 -a $REST_HTTP_CODE -eq 200 ]; then
# this is okay, I guess. happens sometimes during
# POST /admin/mail/aliases/remove
# 56=Unexpected EOF
record "Ignoring curl return code 56 due to 200 status"
elif [ $code -ne 16 -o $REST_HTTP_CODE -ne 200 ]; then
REST_ERROR="CURL failed with code $code"
record "${F_DANGER}$REST_ERROR${F_RESET}"
record "$output"