Handling deletion-related errors in EWS in Exchange

Find out how to handle deletion-related errors in applications that you develop by using the EWS Managed API or EWS in Exchange.

If your application deletes items and folders, you might have to handle deletion-related errors. You can handle these errors at runtime, or while you are developing your EWS application.

Table 1: Deletion-related errors and how to handle them

Error Occurs when you try to… Handle it by…
Delete an instance of a recurring task, and the AffectedTaskOccurrence property is not set.
Setting the AffectedTaskOccurrence property, and retrying the deletion.
Update a calendar item located in the Deleted Items folder when the update would result in sending a meeting invite to attendees.
Canceling the update or moving the calendar item back to the default Calendar folder and updating the calendar item.
Reference a deleted occurrence of a recurring appointment.
Removing a reference to a deleted occurrence.
Delete an item that cannot be deleted.
Quitting attempts to delete the item.
Delete an occurrence of a nonrecurring task or delete the last occurrence of a recurring task.
Deleting a nonrecurring task or quitting attempts to delete the last occurrence of a recurring task.
Delete a distinguished folder.
Indicating that default folders cannot be deleted.
Access a permanently deleted item.
Removing references to an item when it is deleted from the store. If an item is recovered, make sure that you reinstate required references to the client.
Delete a calendar item without specifying whether meeting cancellations should be sent.
Specifying that meeting cancellations should or should not be sent.

See also