Commit c06a673c authored by David Faure's avatar David Faure
Browse files

Don't get stuck in DavGroupwareResource::onItemFetched, on parse error

Sometimes the resource fetches an object (URL to a .ics file) that doesn't exist anymore
(deleted on server, for instance). The error printed a warning but didn't cancel the current task
so the resource would get stuck in that state forever.

Test Plan: Syncing my kolab account continues after printing this error

Reviewers: winterz, vkrause

Reviewed By: vkrause

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision:
parent 0593c500
......@@ -998,6 +998,13 @@ void DavGroupwareResource::onItemFetched(KJob *job, ItemFetchUpdateType updateTy
Akonadi::Item::List extraItems;
if (!Utils::parseDavData(davItem, item, extraItems)) {
qCWarning(DAVRESOURCE_LOG) << "DavGroupwareResource::onItemFetched: Failed to parse item data. " << item.remoteId();
// We get some XML error when the item doesn't exist:
// <d:error xmlns:d="DAV:" xmlns:s="">
// <s:sabredav-version>2.1.11</s:sabredav-version>
// <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
// <s:message>Calendar object not found</s:message>
cancelTask(i18n("Unable to retrieve item: failed to parse item data. Maybe it was deleted already."));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment