mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 04:55:59 +08:00
error
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"OpenIM/pkg/callbackstruct"
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
"OpenIM/pkg/errs"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
@@ -76,13 +77,13 @@ func callBackPostReturn(url, command string, input interface{}, output callbacks
|
||||
b, err := Post(url, nil, input, callbackConfig.CallbackTimeOut)
|
||||
if err != nil {
|
||||
if callbackConfig.CallbackFailedContinue != nil && *callbackConfig.CallbackFailedContinue {
|
||||
return constant.ErrCallbackContinue
|
||||
return errs.ErrCallbackContinue
|
||||
}
|
||||
return constant.NewErrNetwork(err)
|
||||
}
|
||||
if err = json.Unmarshal(b, output); err != nil {
|
||||
if callbackConfig.CallbackFailedContinue != nil && *callbackConfig.CallbackFailedContinue {
|
||||
return constant.ErrCallbackContinue
|
||||
return errs.ErrCallbackContinue
|
||||
}
|
||||
return constant.NewErrData(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user