mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #18579 from overleaf/em-verbose-multi-error
More verbose error on MULTI GitOrigin-RevId: c1e194063bfd4b4cc88bfb5775af13e1533100d4
This commit is contained in:
parent
134232a1a6
commit
e0f6622519
1 changed files with 16 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue