[misc] fix decaff cleanup for reportedToSentry

Previously it would bailout of the loop after processing ANY attribute.
REF: 6fe4dcbf32720282821d42140ab92593866e0772
This commit is contained in:
Jakob Ackermann
2020-03-23 10:48:55 +01:00
parent 7be3c208fd
commit b049331777
2 changed files with 26 additions and 2 deletions
-2
View File
@@ -134,13 +134,11 @@ const Logger = (module.exports = {
this.raven.captureException(error, { tags, extra, level })
// put a flag on the errors to avoid reporting them multiple times
const result = []
for (key in attributes) {
value = attributes[key]
if (value instanceof Error) {
value.reportedToSentry = true
}
return result
}
} catch (err) {
// ignore Raven errors