From e0f662251918d18976000cb1446771718d538135 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Wed, 29 May 2024 09:37:27 -0400 Subject: [PATCH] Merge pull request #18579 from overleaf/em-verbose-multi-error More verbose error on MULTI GitOrigin-RevId: c1e194063bfd4b4cc88bfb5775af13e1533100d4 --- .../document-updater/app/js/RedisManager.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/services/document-updater/app/js/RedisManager.js b/services/document-updater/app/js/RedisManager.js index ec6e2990b2..2c7586eb12 100644 --- a/services/document-updater/app/js/RedisManager.js +++ b/services/document-updater/app/js/RedisManager.js @@ -3,6 +3,7 @@ const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) const logger = require('@overleaf/logger') +const OError = require('@overleaf/o-error') const { promisifyAll } = require('@overleaf/promise-utils') const metrics = require('./Metrics') const Errors = require('./Errors') @@ -110,7 +111,21 @@ const RedisManager = { ) } } - multi.exec(callback) + multi.exec(err => { + if (err) { + callback( + OError.tag(err, 'failed to write doc to Redis in MULTI', { + previousErrors: err.previousErrors.map(e => ({ + name: e.name, + message: e.message, + command: e.command, + })), + }) + ) + } else { + callback() + } + }) } ) })