Save stacktrace of unknown errors

This commit is contained in:
Jonas Lochmann
2020-10-05 02:00:00 +02:00
parent a767a94430
commit 946381226f
+3 -1
View File
@@ -107,7 +107,9 @@ export const applyActionsFromDevice = async ({ database, request, websocket, con
if (ex instanceof ApplyActionException) {
eventHandler.countEvent('applyActionsFromDevice errorDispatchingAction:' + ex.staticMessage)
} else {
eventHandler.countEvent('applyActionsFromDevice errorDispatchingAction:other')
const stack = ex instanceof Error && ex.stack ? ex.stack.substring(0, 4096) : 'no stack'
eventHandler.countEvent('applyActionsFromDevice errorDispatchingAction:other:' + stack)
}
cache.requireFullSync()