middleTruncate(str, length = 5) {
            if (str.length <= length) return str;
            return `${str.slice(0, length)}...${str.slice(-length)}`;
          }
Utility function to truncate a string to a given length for debugging
calls to the API while keeping the actual values mostly intact
@param {string} str - The string to truncate
@param {number} length - The length to truncate the string to
@returns {string} The truncated string