You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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
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.
The text was updated successfully, but these errors were encountered: