mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-24 03:21:20 +00:00
also block "delete component" messages from sentry
This commit is contained in:
parent
64670f272a
commit
37f431f148
1 changed files with 7 additions and 2 deletions
|
@ -25,7 +25,12 @@ module.exports = DispatchManager =
|
|||
backgroundTask = (cb) ->
|
||||
UpdateManager.processOutstandingUpdatesWithLock project_id, doc_id, (error) ->
|
||||
# log everything except OpRangeNotAvailable errors, these are normal
|
||||
if error? and not (error instanceof Errors.OpRangeNotAvailableError)
|
||||
if error?
|
||||
# downgrade OpRangeNotAvailable and "Delete component" errors so they are not sent to sentry
|
||||
logAsWarning = (error instanceof Errors.OpRangeNotAvailableError) || error.message?.match(/^Delete component/)
|
||||
if logAsWarning
|
||||
logger.warn err: error, project_id: project_id, doc_id: doc_id, "error processing update"
|
||||
else
|
||||
logger.error err: error, project_id: project_id, doc_id: doc_id, "error processing update"
|
||||
cb()
|
||||
RateLimiter.run backgroundTask, callback
|
||||
|
|
Loading…
Reference in a new issue