Closed jklmnn closed 8 years ago
I think you proposed that earlier, but it got forgotten. It could give back something like {'itemTitle':item, 'success':true/false}
I would give back a return object in an array, like:
[{'itemTitle'='<item>', 'status'={'type'=<error code>, 'content'='message'}},...]
.
I am not sure if that is necessary for the app. I would leave the list open with the checked items to add and display a symbol for the save status. But I think it is a great idea to include the error msg, but it would proably only be useful for debugging.
I just want to keep the error messages/codes consistent. Also, we could just write a wrapper with this kind of return that executes the save method for each item which would improve the code size.
My proposal is an array like this:
{'itemTitle'='
Why don't you just take the type from error? That contains exactly the same information as status?
The type is also returned on success.
Oh man, I shouldn't be allowed to comment when I'm sick. Yeah, of course, you are right. Once again ;)
Ok, so I will change that to [{'itemTitle'='', 'error'={'type'=, 'content'='message'}}, {...},...]
.
Perfect!
Should be fixed with 7044f871ad1d2efc2deb391d783ca7e91b99aeac.
I went throught the database connectors and noticed that the error handling on multipleSave/multipleDelete is misleading. You iterate over all items and overwrite the return value each time. So the return status depends only on the last action.