diff --git a/internal/sbi/consumer/nrf_service.go b/internal/sbi/consumer/nrf_service.go index 2c68c5a..5a9fc87 100644 --- a/internal/sbi/consumer/nrf_service.go +++ b/internal/sbi/consumer/nrf_service.go @@ -14,7 +14,6 @@ import ( "github.com/free5gc/openapi" "github.com/free5gc/openapi/models" Nnrf_NFDiscovery "github.com/free5gc/openapi/nrf/NFDiscovery" - "github.com/free5gc/openapi/nrf/NFManagement" Nnrf_NFManagement "github.com/free5gc/openapi/nrf/NFManagement" ) @@ -95,7 +94,9 @@ func (s *nnrfService) SendSearchNFInstances( if err != nil { logger.ConsumerLog.Errorf("SearchNFInstances failed: %+v", err) + return nil, err } + return &result, err } @@ -110,7 +111,7 @@ func (s *nnrfService) SendDeregisterNFInstance() (problemDetails *models.Problem ausfContext := s.consumer.Context() client := s.getNFManagementClient(ausfContext.NrfUri) - request := &NFManagement.DeregisterNFInstanceRequest{ + request := &Nnrf_NFManagement.DeregisterNFInstanceRequest{ NfInstanceID: &ausfContext.NfId, } @@ -130,8 +131,8 @@ func (s *nnrfService) RegisterNFInstance(ctx context.Context) ( } var nf models.NrfNfManagementNfProfile - var res *NFManagement.RegisterNFInstanceResponse - registerNFInstanceRequest := &NFManagement.RegisterNFInstanceRequest{ + var res *Nnrf_NFManagement.RegisterNFInstanceResponse + registerNFInstanceRequest := &Nnrf_NFManagement.RegisterNFInstanceRequest{ NfInstanceID: &ausfContext.NfId, NrfNfManagementNfProfile: &nfProfile, } diff --git a/internal/sbi/consumer/udm_service.go b/internal/sbi/consumer/udm_service.go index c6647a4..0e9716e 100644 --- a/internal/sbi/consumer/udm_service.go +++ b/internal/sbi/consumer/udm_service.go @@ -108,7 +108,9 @@ func (s *nudmService) GenerateAuthDataApi( rsp, err := client.GenerateAuthDataApi.GenerateAuthData(ctx, request) if err != nil { var problemDetails models.ProblemDetails - if rsp.UdmUeauAuthenticationInfoResult.AuthenticationVector == nil { + if rsp == nil { + problemDetails.Cause = "NO_RESPONSE_FROM_SERVER" + } else if rsp.UdmUeauAuthenticationInfoResult.AuthenticationVector == nil { problemDetails.Cause = "AV_GENERATION_PROBLEM" } else { problemDetails.Cause = "UPSTREAM_SERVER_ERROR"