mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-02 00:24:06 +00:00
fix off-by-one error in error count
This commit is contained in:
parent
c7a6f44b11
commit
9c7494eb67
1 changed files with 2 additions and 2 deletions
|
@ -71,9 +71,9 @@ module.exports = Logger =
|
|||
@lastErrorCount = 0
|
||||
@lastErrorTimeStamp = now
|
||||
# only report 5 errors every minute to avoid overload
|
||||
if @lastErrorCount <= MAX_ERRORS
|
||||
if @lastErrorCount < MAX_ERRORS
|
||||
# add a note if the rate limit has been hit
|
||||
note = if @lastErrorCount is MAX_ERRORS then "(rate limited)" else ""
|
||||
note = if @lastErrorCount+1 is MAX_ERRORS then "(rate limited)" else ""
|
||||
# report the exception
|
||||
@captureException(attributes, message, "error#{note}")
|
||||
err: () ->
|
||||
|
|
Loading…
Reference in a new issue