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… |
---|---|---|
ErrorAffectedTaskOccurrencesRequired |
Delete an instance of a recurring task, and the AffectedTaskOccurrence property is not set. |
Setting the AffectedTaskOccurrence property, and retrying the deletion. |
ErrorCalendarCannotUpdateDeletedItem |
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. |
ErrorCalendarOccurrenceIsDeletedFromRecurrence |
Reference a deleted occurrence of a recurring appointment. |
Removing a reference to a deleted occurrence. |
ErrorCannotDeleteObject |
Delete an item that cannot be deleted. |
Quitting attempts to delete the item. |
ErrorCannotDeleteTaskOccurrence |
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. |
ErrorDeleteDistinguishedFolder |
Delete a distinguished folder. |
Indicating that default folders cannot be deleted. |
ErrorItemNotFound |
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. |
ErrorSendMeetingCancellationsRequired |
Delete a calendar item without specifying whether meeting cancellations should be sent. |
Specifying that meeting cancellations should or should not be sent. |