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, release: require('./package.json').version,
beforeSend: (event) => { beforeSend: (event) => {
event.exception.values = event.exception.values.map((value) => { event.exception.values = event.exception.values.map((value) => {
if (value.stacktrace) {
value.stacktrace.frames = value.stacktrace.frames.map((frame) => { value.stacktrace.frames = value.stacktrace.frames.map((frame) => {
frame.filename = frame.filename.replace(/^.*ryzen(|-)controller\//g, ""); frame.filename = frame.filename.replace(/^.*ryzen(|-)controller\//g, "");
return frame; return frame;
}) });
}
return value; 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; return event;
} }
}); });