Skip to content

Commit

Permalink
Alter matching string on error message returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
phw198 committed Dec 8, 2023
1 parent 9a3bcc0 commit 79be271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ private void getCalendarSettings() {
try {
cal = request.Execute();
} catch (Google.GoogleApiException ex) {
if (ex.InnerException is Newtonsoft.Json.JsonReaderException && ex.Message.StartsWith("<") && Settings.Instance.Proxy.Type != "None") {
if (ex.InnerException is Newtonsoft.Json.JsonReaderException && ex.InnerException.Message.Contains("Unexpected character encountered while parsing value: <") && Settings.Instance.Proxy.Type != "None") {
log.Warn("Call to CalendarList API endpoint failed. Retrying with trailing '/' in case of poorly configured proxy.");
//The URI ends with "@group.calendar.google.com", which seemingly can cause confusion - see issue #1745
System.Net.Http.HttpRequestMessage hrm = request.CreateRequest();
Expand Down

0 comments on commit 79be271

Please sign in to comment.