1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Refine logging

This commit is contained in:
xmflsct
2022-12-04 14:39:27 +01:00
parent 8d0a58b975
commit 79246ff821
8 changed files with 50 additions and 64 deletions

View File

@ -33,14 +33,11 @@ const pushUseConnect = () => {
})
.then(() => Notifications.setBadgeCountAsync(0))
.catch(error => {
Sentry.setExtras({
API: 'tooot',
expoToken,
...(error?.response && { response: error.response })
})
Sentry.captureMessage('Push connect error', {
contexts: { errorObject: error }
Sentry.setContext('Error response', {
...(error?.response && { response: error.response?._response })
})
Sentry.setContext('Error object', { error })
Sentry.captureMessage('Push connect error')
Notifications.setBadgeCountAsync(0)
if (error?.status == 404) {
displayMessage({
@ -84,10 +81,7 @@ const pushUseConnect = () => {
}
useEffect(() => {
Sentry.setExtras({
expoToken,
pushEnabledCount: pushEnabled
})
Sentry.setContext('Push', { expoToken, pushEnabledCount: pushEnabled.length })
if (expoToken && pushEnabled.length) {
connect()