mirror of https://github.com/tooot-app/app
Try to capture connect failure
This commit is contained in:
parent
95f0c5859b
commit
f11d3abe98
|
@ -3,6 +3,7 @@ import apiTooot from '@api/tooot'
|
||||||
import { displayMessage } from '@components/Message'
|
import { displayMessage } from '@components/Message'
|
||||||
import navigationRef from '@helpers/navigationRef'
|
import navigationRef from '@helpers/navigationRef'
|
||||||
import { useAppDispatch } from '@root/store'
|
import { useAppDispatch } from '@root/store'
|
||||||
|
import * as Sentry from '@sentry/react-native'
|
||||||
import { InstanceLatest } from '@utils/migrations/instances/migration'
|
import { InstanceLatest } from '@utils/migrations/instances/migration'
|
||||||
import { getExpoToken, retrieveExpoToken } from '@utils/slices/appSlice'
|
import { getExpoToken, retrieveExpoToken } from '@utils/slices/appSlice'
|
||||||
import { disableAllPushes } from '@utils/slices/instancesSlice'
|
import { disableAllPushes } from '@utils/slices/instancesSlice'
|
||||||
|
@ -33,6 +34,12 @@ const pushUseConnect = ({ t, instances }: Params) => {
|
||||||
url: `push/connect/${expoToken}`,
|
url: `push/connect/${expoToken}`,
|
||||||
sentry: true
|
sentry: true
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
Sentry.setExtras({
|
||||||
|
API: 'tooot',
|
||||||
|
...(error?.response && { response: error.response }),
|
||||||
|
...(error?.request && { request: error.request })
|
||||||
|
})
|
||||||
|
Sentry.captureException(error)
|
||||||
Notifications.setBadgeCountAsync(0)
|
Notifications.setBadgeCountAsync(0)
|
||||||
if (error?.status == 404) {
|
if (error?.status == 404) {
|
||||||
displayMessage({
|
displayMessage({
|
||||||
|
|
Loading…
Reference in New Issue