JeffDarchuk / SitecoreSidekick

Framework for angularjs based microservice architecture operations.
MIT License
48 stars 33 forks source link

Audit Log save check for null #101

Open alexangas opened 1 year ago

alexangas commented 1 year ago

I just noticed application logs with this error repeated constantly:

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: HtmlDiff
   at HtmlDiff.WordSplitter.ConvertHtmlToListOfWords(String text, IList`1 blockExpressions)
   at HtmlDiff.HtmlDiff.SplitInputsToWords()
   at HtmlDiff.HtmlDiff.Build()
   at Sidekick.AuditLog.Pipelines.OnSave.Process(Object sender, EventArgs e)

It seems to be coming from this line:

https://github.com/JeffDarchuk/SitecoreSidekick/blob/0e9070a76c2dd8844953fc6f664e43270375b030/ScsAuditLog/Pipelines/OnSave.cs#L31-L32

The inputs to the HtmlDiff constructor probably need to be checked for null?