[standards-jig] JEP-0060 Pub/Sub, error conditions

Ralph Meijer jabber.org at ralphm.ik.nu
Fri May 30 16:25:31 UTC 2003

On Fri, May 23, 2003 at 03:27:10PM -0400, Bob Wyman wrote:
> Ralph Meijer wrote:
> > Unsubscribing from a node when you are not subscribed to 
> > the node should return a 401 according to the JEP. But why? 
> > This isn't really an error is it? Just reporting success 
> > seems more logical
> 	If you simply return success, you have hidden a potentially
> important hint that there is a disconnect between the subscriber's
> information concerning subscriptions and the server's view of the same
> data. I would assume that a client that received a 401 in response to
> unsubscribing from a node might wish to take some action which would
> cause it to refresh it's state concerning other subscriptions it
> believes are outstanding.
> 	Returning the 401 is cheap and easily ignored by a client that
> doesn't care. What harm is done by sending it?

The problem is that unsubscribing a jid from another jid (where the base
JIDs do not match) also returns a 401, and there wouldn't be a way to
differentiate between the two cases (except maybe by looking at the error
message, but that's bad).

A client would have to fetch its subscription state anyway upon connection
because it could have changed while it was offline. Having a mismatch
would only occur because of a bad implementation of either the
server of the client.

Then again, the current JEP doesn't provide a way to notify a pending
subscriber that his request was honoured (or not). You therefore cannot
be certain to have a consistent view of your subscription states anyway.

I have suggested doing something like roster updates and having
(un-)subscription requests (when not failing because of not being authorised or
something) just return an empty result, followed by a separate subscription



More information about the Standards mailing list