From b100d282391e21b2ca67632a5b5b992859382f12 Mon Sep 17 00:00:00 2001 From: donald1218 Date: Thu, 24 Oct 2024 06:24:07 +0000 Subject: [PATCH] fix: missing nf res in registernf and type assertion in smf --- internal/sbi/consumer/nrf_service.go | 2 ++ internal/sbi/consumer/smf_service.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/sbi/consumer/nrf_service.go b/internal/sbi/consumer/nrf_service.go index cc5130e..eebd55d 100644 --- a/internal/sbi/consumer/nrf_service.go +++ b/internal/sbi/consumer/nrf_service.go @@ -276,6 +276,7 @@ func (s *nnrfService) SendRegisterNFInstance(ctx context.Context, nrfUri, nfInst } else { // NFRegister resourceUri := res.Location + nf = res.NrfNfManagementNfProfile index := strings.Index(resourceUri, "/nnrf-nfm/") if index >= 0 { resouceNrfUri = resourceUri[:index] @@ -326,6 +327,7 @@ func (s *nnrfService) SendDeregisterNFInstance() (problemDetails *models.Problem // API error derigister_err := apiErr.Model().(Nnrf_NFManagement.DeregisterNFInstanceError) problemDetails = &derigister_err.ProblemDetails + logger.CommLog.Error(problemDetails) } } diff --git a/internal/sbi/consumer/smf_service.go b/internal/sbi/consumer/smf_service.go index 0763f7c..c020767 100644 --- a/internal/sbi/consumer/smf_service.go +++ b/internal/sbi/consumer/smf_service.go @@ -178,7 +178,7 @@ func (s *nsmfService) SendCreateSmContextRequest(ue *amf_context.AmfUe, smContex err1 = localErr if apiErr, ok := localErr.(openapi.GenericOpenAPIError); ok { // API error - posterr := apiErr.Model().(*Nsmf_PDUSession.PostSmContextsError) + posterr := apiErr.Model().(Nsmf_PDUSession.PostSmContextsError) problemDetail = &posterr.ProblemDetails errorResponse = &posterr.PostSmContextsError }