[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling unknown elements in an entry




Dare Obasanjo wrote:
--- Ezra Cooper <ezra@xxxxxxxxxxxx> wrote:


But Rob raises the question: how to express the
deletion of an element. I'm
not sure. Is there ever a difference between
"element X is not in the entry"
and "element X has an empty value"?


Yes.

OK. We have three scenarios here--


 1.) Client omits element and thus deletes it. (woops?)
 2.) Client omits/changes element, but the server doesn't allow it, and
     re-inserts it.
 3.) Client omits/changes element, but the server doesn't allow it, and
     returns a 4xx error.

I think we need to warn about #1, since it will seem strange to an RPC-oriented developer.

I also think we need to explain when #2 is preferable to #3. For example, 6A code will give you a 4xx error if you try to post with a category that doesn't exist on your blog. That feels about right to me, but we need to reconcile it with the need to drop stuff on the floor.

Robert Sayre