mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
rpc mw
This commit is contained in:
@@ -9,7 +9,6 @@ package http
|
||||
import (
|
||||
"OpenIM/pkg/callbackstruct"
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
"OpenIM/pkg/errs"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
@@ -79,13 +78,13 @@ func callBackPostReturn(url, command string, input interface{}, output callbacks
|
||||
if callbackConfig.CallbackFailedContinue != nil && *callbackConfig.CallbackFailedContinue {
|
||||
return errs.ErrCallbackContinue
|
||||
}
|
||||
return constant.NewErrNetwork(err)
|
||||
return errs.ErrNetwork.Wrap(err.Error())
|
||||
}
|
||||
if err = json.Unmarshal(b, output); err != nil {
|
||||
if callbackConfig.CallbackFailedContinue != nil && *callbackConfig.CallbackFailedContinue {
|
||||
return errs.ErrCallbackContinue
|
||||
}
|
||||
return constant.NewErrData(err)
|
||||
return errs.ErrData.Wrap(err.Error())
|
||||
}
|
||||
return output.Parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user