Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onError = (evt) => {
const { source } = this.state;
const { nativeEvent: { error } } = evt;
Sentry.addBreadcrumb({
message: 'Image not loading',
data: {
url: source.uri,
error,
},
});
Sentry.captureMessage('Cannot load sat imagery', 'warning');
console.log(error);
// eslint-disable-next-line global-require
this.setState({ source: require('../../../assets/noImageAvailable.png') });
}
onPress={async () => {
let permissions
try {
permissions = await PushNotification.requestPermissions()
} catch (error) {
Sentry.captureMessage(error.toString())
props.onRequestClose()
}
await props.setNotificationsRequested(true)
if (permissions && permissions.alert) {
props.onRequestClose()
}
}}
/>
capture(() => {
Sentry.captureMessage(message, {logger});
}, store);
}
sendSentryMessage = () => {
Sentry.captureMessage('A Sentry Message', {level: 'info'})
this.showSentryAlert()
}
sendSentryException = () => {