mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-16 20:21:54 +00:00
don't force message over exception but include it as description
This commit is contained in:
parent
7bdf2ef26b
commit
24e097d263
1 changed files with 3 additions and 4 deletions
|
@ -14,15 +14,14 @@ module.exports = Logger =
|
|||
captureException: (attributes, message, level) ->
|
||||
# handle case of logger.error "message"
|
||||
if typeof attributes is 'string'
|
||||
attributes = {err: attributes}
|
||||
attributes = {err: new Error(attributes)}
|
||||
# extract any error object
|
||||
error = attributes.err or attributes.error
|
||||
# use our log message as the title when available
|
||||
# include our log message in the error report
|
||||
if not error?
|
||||
error = {message: message} if typeof message is 'string'
|
||||
else if message?
|
||||
error.exception = error.message
|
||||
error.message = message
|
||||
attributes.description = message
|
||||
# report the error
|
||||
if error?
|
||||
# capture attributes and use *_id objects as tags
|
||||
|
|
Loading…
Reference in a new issue