Closed Bug 949575 Opened 12 years ago Closed 12 years ago

[API][Contacts] removing an already removed contact calls success callback

Categories

(Core Graveyard :: DOM: Contacts, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: zalun, Unassigned)

Details

https://github.com/zalun/KitchenSink/blob/cc8af33e010abe5820f1c31682b5570e2b6af215/kitchensink-app/js/apis/contacts.js#L102-L116 This test creating a contact and then removes it and removes it again. Error callback should be called as such contact doesn't exist.
Hmm, does the spec actually call this out as an error? I find success in the "remove a non-existent entry" case more intuitive. The client asked for the state where the DB does not contain X and open completion the DB does not contain X. Whether any work is done is not really relevant to the caller, is it?
I completely agree with you here, Ben :) Piotr, why do you think calling "onerror" would be better?
Thanks I was just implementing this into Cordova They require an error in such situation. I will add to the docs how we deal with such situation
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Do you know why they choose this path? I mean, if there is a good reason, we can consider changing it too.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.