Skip to content

Commit

Permalink
Merge pull request #133 from sathiyajith/main
Browse files Browse the repository at this point in the history
fix: AMF returned 500 Internal Server Error for a Event Exposure POST API request #579
  • Loading branch information
ianchen0119 authored Jul 1, 2024
2 parents e861d37 + e6efcd5 commit 4f48895
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/sbi/processor/event_exposure.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ func (p *Processor) CreateAMFEventSubscriptionProcedure(createEventSubscription
ueEventSubscription.RemainReports = new(int32)
*ueEventSubscription.RemainReports = subscription.Options.MaxReports
}

if subscription.EventList == nil {
problemDetails := &models.ProblemDetails{
Status: http.StatusBadRequest,
Cause: "SUBSCRIPTION_EMPTY",
}
return nil, problemDetails
}

for _, events := range *subscription.EventList {
immediateFlags = append(immediateFlags, events.ImmediateFlag)
if events.ImmediateFlag {
Expand Down

0 comments on commit 4f48895

Please sign in to comment.