From 7853032975d2da3828ef79aaaee67d30f2aa4e77 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:12:16 -0400 Subject: [PATCH] Merge pull request #19851 from overleaf/em-user-content-logging Avoid logging user content when errors occur in history GitOrigin-RevId: 0326065a15dfc30155847100bb5a077efea771b5 --- libraries/overleaf-editor-core/lib/errors.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/overleaf-editor-core/lib/errors.js b/libraries/overleaf-editor-core/lib/errors.js index 952875f69f..b384cc1451 100644 --- a/libraries/overleaf-editor-core/lib/errors.js +++ b/libraries/overleaf-editor-core/lib/errors.js @@ -4,7 +4,7 @@ class UnprocessableError extends OError {} class ApplyError extends UnprocessableError { constructor(message, operation, operand) { - super(message, { operation, operand }) + super(message) this.operation = operation this.operand = operand } @@ -12,7 +12,7 @@ class ApplyError extends UnprocessableError { class InvalidInsertionError extends UnprocessableError { constructor(str, operation) { - super('inserted text contains non BMP characters', { str, operation }) + super('inserted text contains non BMP characters') this.str = str this.operation = operation } @@ -20,10 +20,7 @@ class InvalidInsertionError extends UnprocessableError { class TooLongError extends UnprocessableError { constructor(operation, resultLength) { - super(`resulting string would be too long: ${resultLength}`, { - operation, - resultLength, - }) + super('resulting string would be too long', { resultLength }) this.operation = operation this.resultLength = resultLength }