【发布时间】:2020-05-07 22:19:33
【问题描述】:
我们在使用 Graph API 时收到针对单个用户的错误。我们没有收到其他用户帐户的此错误。该过程正在通过电子邮件主题寻找以某些短语开头的主题。如果他们以这些短语开头,则会将他们的日历标记为这些约会的“休假”。
有没有人遇到过这样的错误或有一些故障排除技巧?
谢谢,
布莱恩·奥尔德里奇
LeaveExchangeSync 出错 -- System.AggregateException:出现一个或多个错误。 ---> System.Exception:调用 Graph API URL https://graph.microsoft.com/beta/Users/aankrah@resdat.com/calendar/calendarView?startDateTime=2019-11-17T19:04:41&endDateTime=2021-11-17T19:04:41&top=100 时出现异常 ---> Microsoft.Graph.ServiceException:代码:UnknownError
内部错误
在 Microsoft.Graph.HttpProvider.d__19.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 C:\code\Intranet\RDI.Core\Azure\GraphServiceClientExtensions.cs:line 48 中的 RDI.Core.Azure.GraphServiceClientExtensions.d__0.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 55 中的 RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext()
--- 内部异常堆栈跟踪结束 ---
在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 87 中的 RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 RDI.Service.Plugins.LeaveExchangeSync.CalendarService.c__DisplayClass21_0.1.GetResultCore(Boolean waitCompletionNotification)
at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.GetUserEvents(String user) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 168
at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.GetVacationEvents(String user) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 152
at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.SyncAutomatedAppointments(List1 个用户,List`1 约会,字符串 eventType)在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 67
在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\LeaveExchangeSync.cs:line 109 中的 RDI.Service.Plugins.LeaveExchangeSync.LeaveExchangeSync.OnTimer(Object sender, ElapsedEventArgs e)
--->(内部异常 #0)System.Exception:调用 Graph API URL https://graph.microsoft.com/beta/Users/aankrah@resdat.com/calendar/calendarView?startDateTime=2019-11-17T19:04:41&endDateTime=2021-11-17T19:04:41&top=100 时出现异常 ---> Microsoft.Graph.ServiceException:代码:UnknownError
内部错误
在 Microsoft.Graph.HttpProvider.d__19.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 C:\code\Intranet\RDI.Core\Azure\GraphServiceClientExtensions.cs:line 48 中的 RDI.Core.Azure.GraphServiceClientExtensions.d__0.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 55 中的 RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext()
--- 内部异常堆栈跟踪结束 ---
在 C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 87 中的 RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext()
--- 从先前抛出异常的位置结束堆栈跟踪 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在 RDI.Service.Plugins.LeaveExchangeSync.CalendarService.c__DisplayClass21_0.
【问题讨论】:
-
嗨,欢迎来到 S.O.我会将您的异常消息格式化为“代码”以更具可读性,并且我会考虑删除一些无关的堆栈信息和您公司的库名称。
标签: c# azure-active-directory office365 azure-ad-graph-api