mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Further improvement of error handling for LZString
This does some more in depth check on the error message and minimizes the log noise that is caused by LZString. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
parent
1f85017625
commit
db5b86df4c
2 changed files with 10 additions and 2 deletions
|
@ -47,7 +47,11 @@ function getHistory (userid, callback) {
|
|||
}
|
||||
} catch (err) {
|
||||
// most error here comes from LZString, ignore
|
||||
logger.error(err)
|
||||
if (err.message === 'Cannot read property \'charAt\' of undefined') {
|
||||
logger.warning('Looks like we can not decode "' + history[i].id + '" with LZString. Can be ignored.')
|
||||
} else {
|
||||
logger.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
history = parseHistoryToObject(history)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue