Object deleted error fix.

This commit is contained in:
Burak Kaan Köse
2025-11-30 17:51:10 +01:00
parent a8a5d3c3d6
commit 9fbbd00dc5
2 changed files with 11 additions and 1 deletions
@@ -18,7 +18,7 @@ public class ObjectCannotBeDeletedHandler : ISynchronizerErrorHandler
public bool CanHandle(SynchronizerErrorContext error)
{
return error.ErrorMessage.Contains("ErrorCannotDeleteObject") && error.RequestBundle is HttpRequestBundle<RequestInformation>;
return error.ErrorMessage.Contains("Object cannot be deleted.") && error.RequestBundle is HttpRequestBundle<RequestInformation>;
}
public async Task<bool> HandleAsync(SynchronizerErrorContext error)
@@ -893,6 +893,16 @@ public class OutlookSynchronizer : WinoSynchronizer<RequestInformation, Message,
{
throw;
}
//catch (ServiceException retryAfterException) when (retryAfterException.ResponseStatusCode == 429 && retryAfterException.ResponseHeaders.Contains("Retry-After"))
//{
// // This request must be retried after some time.
// var retryAfterValue = retryAfterException.ResponseHeaders.GetValues("Retry-After").FirstOrDefault();
// if (int.TryParse(retryAfterValue, out int seconds))
// {
// await Task.Delay(seconds);
// }
//}
catch (ServiceException serviceException)
{
// TODO: AOT Comaptible inner exception deserialization.