Skip to content

Commit

Permalink
chore: delete the redundant error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KunLee76 committed Oct 1, 2024
1 parent 87b6eae commit 45f1bc4
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions internal/sbi/consumer/nrf_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *nnrfService) SendNFStatusNotify(
NrfNfManagementNotificationData: &notifcationData,
}

res, err := client.SubscriptionsCollectionApi.CreateSubscriptionOnNFStatusEventPost(
_, err := client.SubscriptionsCollectionApi.CreateSubscriptionOnNFStatusEventPost(
ctx, nfInstanceUri, request)
if err != nil {
logger.NfmLog.Infof("Notify fail: %v", err)
Expand All @@ -84,15 +84,6 @@ func (s *nnrfService) SendNFStatusNotify(
}
return problemDetails
}
if res != nil {
if res.AcceptEncoding != "" && res.AcceptEncoding != "application/json" {
logger.NfmLog.Warnln("Unexpected Accept-Encoding in response: ", res.AcceptEncoding)
problemDetails := &models.ProblemDetails{
Status: http.StatusUnsupportedMediaType,
Cause: "NOTIFICATION_ERROR",
}
return problemDetails
}
}

Check failure on line 87 in internal/sbi/consumer/nrf_service.go

View workflow job for this annotation

GitHub Actions / lint (1.21)

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/free5gc) --custom-order (gci)
return nil
}

0 comments on commit 45f1bc4

Please sign in to comment.