From 08f98cc02f7dc96600d34115e7476dbbb7e67adf Mon Sep 17 00:00:00 2001 From: ashwin63 Date: Sat, 20 Jul 2024 12:35:27 -0400 Subject: [PATCH] fix: subscription not sent --- internal/sbi/processor/event_exposure.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/sbi/processor/event_exposure.go b/internal/sbi/processor/event_exposure.go index 4809d69..3f830a8 100644 --- a/internal/sbi/processor/event_exposure.go +++ b/internal/sbi/processor/event_exposure.go @@ -37,6 +37,13 @@ func (p *Processor) CreateAMFEventSubscriptionProcedure(createEventSubscription createdEventSubscription := &models.AmfCreatedEventSubscription{} subscription := createEventSubscription.Subscription + if subscription == nil { + problemDetails := &models.ProblemDetails{ + Status: http.StatusBadRequest, + Cause: "SUBSCRIPTION_EMPTY", + } + return nil, problemDetails + } contextEventSubscription := &context.AMFContextEventSubscription{} contextEventSubscription.EventSubscription = *subscription var isImmediate bool