|
@@ -25,8 +25,13 @@ module.exports = DispatchManager =
|
|
|
backgroundTask = (cb) ->
|
|
backgroundTask = (cb) ->
|
|
|
UpdateManager.processOutstandingUpdatesWithLock project_id, doc_id, (error) ->
|
|
UpdateManager.processOutstandingUpdatesWithLock project_id, doc_id, (error) ->
|
|
|
# log everything except OpRangeNotAvailable errors, these are normal
|
|
# log everything except OpRangeNotAvailable errors, these are normal
|
|
|
- if error? and not (error instanceof Errors.OpRangeNotAvailableError)
|
|
|
|
|
- logger.error err: error, project_id: project_id, doc_id: doc_id, "error processing update"
|
|
|
|
|
|
|
+ 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()
|
|
cb()
|
|
|
RateLimiter.run backgroundTask, callback
|
|
RateLimiter.run backgroundTask, callback
|
|
|
|
|
|