X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=a1-go%2Fpkg%2Fresthooks%2Fresthooks.go;h=cb87040507c2d9b6ef532920caa0db4822176991;hb=521fb5516a4212246ff977a849dfd24f0c87b2a6;hp=508bc49736968eacbad1240b55aa390f36eb18f3;hpb=857a953ebb2d8a487ea5b2ee99087871103c8a99;p=ric-plt%2Fa1.git diff --git a/a1-go/pkg/resthooks/resthooks.go b/a1-go/pkg/resthooks/resthooks.go index 508bc49..cb87040 100644 --- a/a1-go/pkg/resthooks/resthooks.go +++ b/a1-go/pkg/resthooks/resthooks.go @@ -394,7 +394,7 @@ func (rh *Resthook) CreatePolicyInstance(policyTypeId models.PolicyTypeID, polic } message := rmr.Message{} - rmrMessage, err = message.PolicyMessage(strconv.FormatInt((int64(policyTypeId)), 10), string(policyInstanceID), httpBodyString, operation) + rmrMessage, err := message.PolicyMessage(strconv.FormatInt((int64(policyTypeId)), 10), string(policyInstanceID), httpBodyString, operation) if err != nil { a1.Logger.Error("error : %v", err) return err @@ -683,10 +683,10 @@ func (rh *Resthook) DeletePolicyInstance(policyTypeId models.PolicyTypeID, polic rh.storeDeletedPolicyInstanceMetadata(policyTypeId, policyInstanceID, creation_timestamp.(string)) message := rmr.Message{} - rmrMessage, err = message.PolicyMessage(strconv.FormatInt((int64(policyTypeId)), 10), string(policyInstanceID), "", "DELETE") - if err != nil { - a1.Logger.Error("error : %v", err) - return err + rmrMessage, err1 := message.PolicyMessage(strconv.FormatInt((int64(policyTypeId)), 10), string(policyInstanceID), "", "DELETE") + if err1 != nil { + a1.Logger.Error("error : %v", err1) + return err1 } isSent := rh.iRmrSenderInst.RmrSendToXapp(rmrMessage, a1PolicyRequest) if isSent {