ne & param

This commit is contained in:
2023-10-08 14:18:18 +08:00
parent c209873f6c
commit 57659de7a2
2 changed files with 7 additions and 6 deletions

View File

@@ -81,8 +81,8 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
Get(requestURI2NF)
if err != nil {
log.Error("Get from NF is failure:", err)
services.ResponseInternalServerError500NFConnectRefused(w)
log.Error("Failed to Get from NF:", err)
services.ResponseInternalServerError500ProcessError(w, err)
return
} else {
_ = json.Unmarshal(resp.Body(), &response)
@@ -138,7 +138,7 @@ func PostParamConfigToNF(w http.ResponseWriter, r *http.Request) {
Post(requestURI2NF)
if err != nil {
log.Error("Failed to POST to NF:", err)
services.ResponseInternalServerError500NFConnectRefused(w)
services.ResponseInternalServerError500ProcessError(w, err)
return
}
@@ -189,8 +189,8 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
SetBody(body).
Put(requestURI2NF)
if err != nil {
log.Error("Put to NF failed:", err)
services.ResponseInternalServerError500NFConnectRefused(w)
log.Error("Failed to Put to NF:", err)
services.ResponseInternalServerError500ProcessError(w, err)
return
}