fix(developers): Sentry unable to retrieve stacktrace frames in some cases.

This commit is contained in:
Quentin Decaunes 2019-08-04 10:07:49 +02:00
parent ebfdb864ef
commit f52edce8fc

View File

@ -8,13 +8,17 @@ ready(function(){
release: require('./package.json').version,
beforeSend: (event) => {
event.exception.values = event.exception.values.map((value) => {
value.stacktrace.frames = value.stacktrace.frames.map((frame) => {
frame.filename = frame.filename.replace(/^.*ryzen(|-)controller\//g, "");
return frame;
})
if (value.stacktrace) {
value.stacktrace.frames = value.stacktrace.frames.map((frame) => {
frame.filename = frame.filename.replace(/^.*ryzen(|-)controller\//g, "");
return frame;
});
}
return value;
});
event.request.url = event.request.url.replace(/^.*ryzen(|-)controller\//g, "")
if (event.request.url) {
event.request.url = event.request.url.replace(/^.*ryzen(|-)controller\//g, "");
}
return event;
}
});