Change logging output level for JSON elements that contain URL encoding (#3232)

* Change logging output level for JSON elements that contain URL encoding
This commit is contained in:
abraunegg 2025-04-23 06:59:14 +10:00 committed by GitHub
commit 31313516e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5742,8 +5742,10 @@ class SyncEngine {
newItemPath = decodeComponent(selfBuiltPath);
} catch (URIException exception) {
// why?
addLogEntry("ERROR: Unable to URL Decode path: " ~ exception.msg);
addLogEntry("ERROR: To resolve, rename this item online: " ~ selfBuiltPath);
if (verboseLogging) {
addLogEntry("ERROR: Unable to URL Decode path: " ~ exception.msg, ["verbose"]);
addLogEntry("ERROR: To resolve, rename this item online: " ~ selfBuiltPath, ["verbose"]);
}
// have to use as-is due to decode error
newItemPath = selfBuiltPath;
}
@ -5768,8 +5770,8 @@ class SyncEngine {
// Check for HTML entities (e.g., '%20' for space) in newItemPath
if (containsURLEncodedItems(newItemPath)) {
addLogEntry("CAUTION: The JSON element transmitted by the Microsoft OneDrive API includes HTML URL encoded items, which may complicate pattern matching and potentially lead to synchronisation problems for this item.");
if (verboseLogging) {
addLogEntry("CAUTION: The JSON element transmitted by the Microsoft OneDrive API includes HTML URL encoded items, which may complicate pattern matching and potentially lead to synchronisation problems for this item.", ["verbose"]);
addLogEntry("WORKAROUND: An alternative solution could be to change the name of this item through the online platform: " ~ newItemPath, ["verbose"]);
addLogEntry("See: https://github.com/OneDrive/onedrive-api-docs/issues/1765 for further details", ["verbose"]);
}