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

Requirement: Document what happens if a Consumer tries to unsubscribe but no subscription exists #28

Open
RobWin opened this issue Dec 19, 2024 · 1 comment

Comments

@RobWin
Copy link
Collaborator

RobWin commented Dec 19, 2024

While implementing the unsubscribeEvent I'm actually unsure how it is specified in WoT.
If a consumer unsubscribes from an event where it has never subscribed to. Would you expect a error message or should it be an idempotent operation and not return an error message?
It's the same discussion like in a HTTP DELETE call. Usually I prefer to make DELETE idempotent and not throw a error if the resource is already deleted.

I would prefer to not throw an error message when there is no event subscription.
While implementing it, I definitely think that some sort of acknowledgement message after a subscription or unsubscription would make sense.

@benfrancis
Copy link
Member

@RobWin wrote:

If a consumer unsubscribes from an event where it has never subscribed to. Would you expect a error message or should it be an idempotent operation and not return an error message?

I don't have a strong opinion but I tend to agree that this doesn't necessarily need to throw an error.

Either way it would be good to document this in the specification, either as a normative requirement if an error is expected or as a Note if none is expected.

I definitely think that some sort of acknowledgement message after a subscription or unsubscription would make sense.

I see you filed #29 for this, thanks.

@benfrancis benfrancis changed the title Question: How to handle unsubscribe event if no subscription exists Requirement: Document what happens if a Consumer tries to unsubscribe but no subscription exists Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants