diff --git a/internal/sbi/consumer/amf_service.go b/internal/sbi/consumer/amf_service.go index b9401c4c..66112058 100644 --- a/internal/sbi/consumer/amf_service.go +++ b/internal/sbi/consumer/amf_service.go @@ -53,7 +53,7 @@ func (s *namfService) N1N2MessageTransfer( } rsp, err := client.N1N2MessageCollectionCollectionApi.N1N2MessageTransfer(ctx, n1n2MessageTransferRequest) - if err != nil { + if err != nil || rsp == nil { return nil, err } diff --git a/internal/sbi/consumer/pcf_service.go b/internal/sbi/consumer/pcf_service.go index 80f1aae6..386eb76c 100644 --- a/internal/sbi/consumer/pcf_service.go +++ b/internal/sbi/consumer/pcf_service.go @@ -102,7 +102,7 @@ func (s *npcfService) SendSMPolicyAssociationCreate(smContext *smf_context.SMCon } smPolicyDecisionFromPCF, err := client.SMPoliciesCollectionApi.CreateSMPolicy(ctx, request) - if err != nil { + if err != nil || smPolicyDecisionFromPCF == nil { return "", nil, err } diff --git a/internal/sbi/processor/association.go b/internal/sbi/processor/association.go index 305bad13..1ce54d27 100644 --- a/internal/sbi/processor/association.go +++ b/internal/sbi/processor/association.go @@ -253,7 +253,7 @@ func (p *Processor) requestAMFToReleasePDUResources( rspData, err := p.Consumer(). N1N2MessageTransfer(ctx, smContext.Supi, n1n2Request, smContext.CommunicationClientApiPrefix) - if err != nil { + if err != nil || rspData == nil { logger.ConsumerLog.Warnf("N1N2MessageTransfer for RequestAMFToReleasePDUResources failed: %+v", err) // keep SM Context to avoid inconsistency with AMF smContext.SetState(smf_context.InActive) diff --git a/internal/sbi/processor/datapath.go b/internal/sbi/processor/datapath.go index 6aa807e0..7a68379b 100644 --- a/internal/sbi/processor/datapath.go +++ b/internal/sbi/processor/datapath.go @@ -272,7 +272,7 @@ func (p *Processor) sendPDUSessionEstablishmentReject( } rspData, err := p.Consumer(). N1N2MessageTransfer(ctx, smContext.Supi, n1n2Request, smContext.CommunicationClientApiPrefix) - if err != nil { + if err != nil || rspData == nil { logger.ConsumerLog.Warnf("N1N2MessageTransfer for SendPDUSessionEstablishmentReject failed: %+v", err) return } @@ -331,7 +331,7 @@ func (p *Processor) sendPDUSessionEstablishmentAccept( rspData, err := p.Consumer(). N1N2MessageTransfer(ctx, smContext.Supi, n1n2Request, smContext.CommunicationClientApiPrefix) - if err != nil { + if err != nil || rspData == nil { logger.ConsumerLog.Warnf("N1N2MessageTransfer for sendPDUSessionEstablishmentAccept failed: %+v", err) return }