Skip to content

Commit

Permalink
Handle document under workflow - changed the eventName in exception log
Browse files Browse the repository at this point in the history
  • Loading branch information
kapustb committed Oct 25, 2023
1 parent 87d9b89 commit 5be465e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Services/Implementations/DefaultAlgoliaTaskLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void HandleEvent(TreeNode node, string eventName)
return;
}

LogAlgoliaTask(node, eventName);
LogAlgoliaTask(node, eventName, nameof(HandleEvent));
}

/// <summary>
Expand All @@ -42,10 +42,10 @@ public void HandleEvent(TreeNode node, string eventName)
/// <param name="eventName">The name of the Xperience event that was triggered.</param>
public void ForceHandleEvent(TreeNode node, string eventName)
{
LogAlgoliaTask(node, eventName);
LogAlgoliaTask(node, eventName, nameof(ForceHandleEvent));
}

private void LogAlgoliaTask(TreeNode node, string eventName)
private void LogAlgoliaTask(TreeNode node, string eventName, string exceptionLogEventCode)
{
foreach (var indexName in IndexStore.Instance.GetAll().Select(index => index.IndexName))
{
Expand All @@ -61,7 +61,7 @@ private void LogAlgoliaTask(TreeNode node, string eventName)
}
catch (InvalidOperationException ex)
{
eventLogService.LogException(nameof(DefaultAlgoliaTaskLogger), nameof(ForceHandleEvent), ex);
eventLogService.LogException(nameof(DefaultAlgoliaTaskLogger), exceptionLogEventCode, ex);
}
}
}
Expand Down

0 comments on commit 5be465e

Please sign in to comment.