[GH-ISSUE #104] Do not log TaskCanceledException as error #568

Closed
opened 2026-03-01 17:39:57 +03:00 by kerem · 2 comments
Owner

Originally created by @maybeec on GitHub (Jan 19, 2016).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/104

I think this should also not reported as an error to the user, shouldn't it?
Or does it cause any harm on synchronization?

I think the error was caused by shutting down my PC to StandyBy.

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>CalDAV</ProfileName>
  <ProfileId>31b1199f-ef4b-42f8-b097-d0c77e9e6555</ProfileId>
  <StartTime>2016-01-18T21:23:51.1131552Z</StartTime>
  <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed>
  <LoadErrors />
  <EntitySynchronizationReports />
  <ExceptionThatLeadToAbortion>System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion>
  <Duration>08:51:39.2164937</Duration>
</SynchronizationReport>
Originally created by @maybeec on GitHub (Jan 19, 2016). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/104 I think this should also not reported as an error to the user, shouldn't it? Or does it cause any harm on synchronization? I think the error was caused by shutting down my PC to StandyBy. ``` xml <?xml version="1.0" encoding="utf-16"?> <SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ProfileName>CalDAV</ProfileName> <ProfileId>31b1199f-ef4b-42f8-b097-d0c77e9e6555</ProfileId> <StartTime>2016-01-18T21:23:51.1131552Z</StartTime> <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed> <LoadErrors /> <EntitySynchronizationReports /> <ExceptionThatLeadToAbortion>System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__a.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion> <Duration>08:51:39.2164937</Duration> </SynchronizationReport> ```
kerem closed this issue 2026-03-01 17:39:57 +03:00
Author
Owner

@aluxnimm commented on GitHub (Jan 20, 2016):

Well we can't distinguish if you lost your network or the server has some issues or a timeout, it won't do any harm and will be tried again with the next sync run of course. But maybe it could be a warning instead of an error yes.

<!-- gh-comment-id:173029705 --> @aluxnimm commented on GitHub (Jan 20, 2016): Well we can't distinguish if you lost your network or the server has some issues or a timeout, it won't do any harm and will be tried again with the next sync run of course. But maybe it could be a warning instead of an error yes.
Author
Owner

@aluxnimm commented on GitHub (Apr 16, 2017):

Finally we tried to improve this behaviour and log the first network errors only as warnings to avoid errors after startup from hibernate for example, will be in 2.19.0.

<!-- gh-comment-id:294356535 --> @aluxnimm commented on GitHub (Apr 16, 2017): Finally we tried to improve this behaviour and log the first network errors only as warnings to avoid errors after startup from hibernate for example, will be in 2.19.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#568
No description provided.