Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -956,16 +956,16 @@ private string GetJsonValue(string json, string propName, bool isExisting)
var startIndex = json.IndexOf($"\"{propName}\":\"", StringComparison.Ordinal);
if (startIndex == -1)
{
// I think this should be a warning because it happens every time a resource is deleted. Maybe even info.
_logger.LogWarning($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
// This happens during normal operations (e.g., resource deletion) and is not an error condition.
_logger.LogInformation($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
return string.Empty;
}

startIndex = startIndex + propName.Length + 4;
var endIndex = json.IndexOf('"', startIndex);
if (endIndex == -1)
{
_logger.LogWarning($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
_logger.LogInformation($"Cannot parse {propName} value from {(isExisting ? "existing" : "input")}");
return string.Empty;
}

Expand Down