This commit is contained in:
withchao 2023-01-12 16:50:26 +08:00
parent 6c6e02967a
commit b0834ae437

View File

@ -65,13 +65,13 @@ func CallBackPostReturn(url, callbackCommand string, input interface{}, output c
b, err := Post(url, input, timeOut) b, err := Post(url, input, timeOut)
if err != nil { if err != nil {
if failedContinue != nil && *failedContinue { if failedContinue != nil && *failedContinue {
return &constant.ErrCallbackContinue return constant.ErrCallbackContinue
} }
return constant.NewErrNetwork(err) return constant.NewErrNetwork(err)
} }
if err = json.Unmarshal(b, output); err != nil { if err = json.Unmarshal(b, output); err != nil {
if failedContinue != nil && *failedContinue { if failedContinue != nil && *failedContinue {
return &constant.ErrCallbackContinue return constant.ErrCallbackContinue
} }
return constant.NewErrData(err) return constant.NewErrData(err)
} }