Trim stack trace from extension errors
This commit is contained in:
1 parent
75ddfc38b1
commit
0d6f9265f7
1 file changed
+6
-1
@@ -38,8 +38,13 @@ function errorToFault(err) {
|
||||
}
|
||||
};
|
||||
|
||||
if (err.stack)
|
||||
if (err.stack) {
|
||||
fault.detail.stack = err.stack;
|
||||
// Trim the stack trace
|
||||
let stackTrimIndex = fault.detail.stack.match(/\s+at\s[^\s]+\s\(.*extension-wrapper\.js:.+\)/);
|
||||
if (stackTrimIndex)
|
||||
fault.detail.stack = fault.detail.stack.slice(0, stackTrimIndex.index);
|
||||
}
|
||||
|
||||
return fault;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user