Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (obj.status_code) {
breadcrumb.data.status_code = obj.status_code;
}
if (obj.url) {
const match = (/^(?:https?:\/\/)[^/]+(\/.*)$/);
if (match && match.length >= 2) {
breadcrumb.data.url = match[1];
}
}
try {
Sentry.addBreadcrumb(breadcrumb);
} catch (e) {
// Do nothing since this is only here to make sure we don't crash when handling an exception
console.warn('Failed to capture breadcrumb of non-error', e); // eslint-disable-line no-console
}
}
if (Platform.OS !== 'ios')
return
while (true) {
// Wait until we get ANY event
const { type, payload } = yield take()
if (type.startsWith('rrf') || type.startsWith('@'))
continue
if (filter[type])
filter[type].forEach(path =>
recursiveReplacer(path.split(/\./), payload)
)
Sentry.addBreadcrumb({
category: 'redux',
message: type,
level: type.match(/ERROR/) ? Sentry.Severity.Warning : Sentry.Severity.Info,
...(payload ?
{data: typeof payload === 'object' ? payload : {payload}} :
{}
)
})
}
}
return (action) => {
Sentry.addBreadcrumb(makeBreadcrumbFromAction(action));
return next(action);
};
};