Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to inform API consumer about unprocessable subscription request in Async mode #243

Open
bigludo7 opened this issue Jul 3, 2024 · 8 comments
Assignees
Labels

Comments

@bigludo7
Copy link
Collaborator

bigludo7 commented Jul 3, 2024

Problem description
In our subscription model we offer possibility for server to handle it synchronously or asynchronously.

Suppose we have a subscription request that the server is not able to handle (the monitoring area is not within operator area, the reachability status could ne follow this specific number, etc...) and the subscription server handles it in async mode.

How to inform the subscription requester that the request in not processable when server manages it in asynchronously ?

(in sync mode we do not have issue as we send back a 4xx error)

Possible evolution

  • add another TerminationReason value: SUBSCRIPTION_UNPROCESSABLE
  • add terminationReasonComment attibute to allow server to provide explantation

Alternative solution

Additional context
cc: @PedroDiez & @shilpa-padgaonkar @akoshunyadi

@PedroDiez
Copy link
Collaborator

I understand this would be the case where, being a Telco Operator behaving in async mode, the processing of the subscriptionDetail information is happening after providing a subcriptionId.

So as, if GET /subscription would be queried, the "status" of the subscriptionId would be "ACTIVATION_REQUESTED" and after the processing is done and realized cannot be managed, the new proposed eventTermination Reason is returned back: SUBSCRIPTION_UNPROCESSABLE.

Regarding the final "status" of this kind of subscriptions, I think the best approach is not kept as "DELETED" and effectively removed them "as they never existed" because it adds no historical value a subscription that would never be working (just thinking in loud).

In principle makes sense to me and I am checking in parallel internally with our team

@maxl2287
Copy link
Contributor

@PedroDiez did you already have time to check this internally with your team?

@rartych
Copy link
Collaborator

rartych commented Aug 7, 2024

It occurred that we have optional property in event-subscription-template.yaml :

terminationDescription:
type: string

Currently it is not used in subscription APIs and missing description attribute.

@maxl2287
Copy link
Contributor

@rartych From DeviceLocation side we aggree on using the terminationDescription. ✅
The second proposal from @bigludo7 was to add the terminationReason SUBSCRIPTION_UNPROCESSABLE.

Can we also align on that?

cc @PedroDiez @shilpa-padgaonkar @jlurien

@maxl2287
Copy link
Contributor

@rartych From DeviceLocation side we aggree on using the terminationDescription. ✅ The second proposal from @bigludo7 was to add the terminationReason SUBSCRIPTION_UNPROCESSABLE.

Can we also align on that?

cc @PedroDiez @shilpa-padgaonkar @jlurien

@rartych or @PedroDiez again requesting if we could align on terminationReason SUBSCRIPTION_UNPROCESSABLE?

@PedroDiez
Copy link
Collaborator

@rartych From DeviceLocation side we aggree on using the terminationDescription. ✅ The second proposal from @bigludo7 was to add the terminationReason SUBSCRIPTION_UNPROCESSABLE.
Can we also align on that?
cc @PedroDiez @shilpa-padgaonkar @jlurien

@rartych or @PedroDiez again requesting if we could align on terminationReason SUBSCRIPTION_UNPROCESSABLE?

I think we can align on that and set formally in MetaRelease Spring 25. Ok with the decsision taken in Device Location

@bigludo7
Copy link
Collaborator Author

bigludo7 commented Oct 1, 2024

I think we are aligned on this.
I can make a proposal in a PR for update in the guideline & event-subscription-template.yaml
@rartych you can assign on me & add subscriptions tag :)

bigludo7 added a commit to bigludo7/Commonalities that referenced this issue Oct 10, 2024
Add  SUBSCRIPTION_UNPROCESSABLE in terminationReason enum for subscription ends event.
Solve camaraproject#243
bigludo7 added a commit to bigludo7/Commonalities that referenced this issue Oct 10, 2024
Explicit subscription-end termination reason usage.
Fix camaraproject#243
@shilpa-padgaonkar
Copy link
Collaborator

@maxl2287 @PedroDiez @bigludo7 Fine for me to agree on terminationReason and SUBSCRIPTION_UNPROCESSABLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants