Changes:
1. Define Core.ExceptionType
-optional info property of type MessageType
2. (re) Define Core.ValueExceptionType : ExceptionType
-optional value property of type string
3. Define Core.ResourceException:ExceptionType to mark a resource or collection within a success payload as in error.
-optional retryLink
4. Define Core.ModificationException of type DataModificationException : ExceptionType
-failedOperation (insert, update, upsert, delete, invoke, addlink, removelink)
-optional responseCode (i.e., 424 for failed dependency)
Clarifications:
1. (non-key) Properties within tombstones in update payloads are effectively ignored
Scenarios:
1. Error retrieving a value within a structured resource (does not require continueonerror)
a) Annotate property with the new Core.ValueException
2. Error retrieving a resource within a collection (any collection, with continueonerror)
a) Annotate resource within collection with Core.NestedItemException
3. Error retrieving part of a collection (with continueonerror)
a) Return a NextLink
4. Error retrieving entire collection within a resource (with continueonerror)
a) Annotate collection property with Core.NestedItemException
5. Applying a delta update
a) Return=representation response is a Delta response that is 1:1 with delta request
b) Entities within the response have current persisted values
c) Don’t support $select, $filter, $expand, $orderby, $search, $count, etc…
d) If continue-on-error
i) Failed deletes are returned as entities/entity references, annotated with DataModificationException (operation=delete or unlink)
ii) Failed inserts are returned as tombstones with DataModificationException (operation=insert)
iii) Failed updates may be annotated with DataModificationException (operation=update)
iv) Failed addedlinks returned as deletedlink with DataModificationException (operation=link)
v) Failed deletedlinks returned as addedlink with DataModificationException (operation=unlink)
e) If the delta update contains a nested full representation, the response contains the full nested representation of the after-image.
g) If the update of a nested resource fails, the update to the parent (and siblings) may fail
i) Operation is the operation attempted at the resource that is annotated (i.e., update)
ii) May return 424 Failed Dependency as status for related resources
i) Unlike batch, if it is not annotated with failed, it is success
h) If return=minimal + ContinueOnError, service MUST return at least the things in error
i) perhaps as a flattened delta payload
6. Applying a deep update/insert
a) Don't support continue-on-error for deep inserts/updates
b) Deep updates can support delta collections and inline full representations. Deep inserts are not extended to support updating - the client can do a delta update against the collection with the single entity to be inserted, including nested information to be updated.
c) Response is the same shape as the deep update/insert in the request
d) Entities within the response have current persisted values
7. Applying a set-based update
a) Response (if specified by return=representation) is the delta response showing current values (after-image) of the set of things identified by the input collection (i.e., after any filter segment). Note that specifying return=representation may remove any implementation optimizations around doing the set operation.
b) Note: may be deep update (including nested collection/delta collection, in which case above rules apply)
c) Don’t specify support for query options
d) If continue-on-error
i) Failed updates may be annotated with DataModificationException (operation=update)
ii) If return=minimal + continue on error, MUST return at least the things in error (perhaps flattened)
8. Applying a set-based delete
a) Response (if specified by return=representation) is the delta response showing tombstones for the set of things identified by the input collection (i.e., after any filter segment). Note that specifying return=representation may remove any implementation optimizations around doing the set operation.
b) Don't specify support for query options
c) If continue-on-error
i) Failed deletes returned as entity/entity reference with DataModificationException (operation=delete)
ii) If return=minimal + continue on error, MUST return at least failures
9. Applying a set-based action invocation
a) Clarify that (if specified by return=representation) the result of a set-based action invocation is a collection of the individual action responses as if they had been invoked separately (including any value wrapper for collections or primitives).
c) Support for query options is not specified, but apply to each individual action response
d) If continue-on-error
i) Response objects returned from failed invocations may be annotated with DataModificationException (operation=invoke)
ii) If return=minimal + continue on error, MUST return at least the things in error