Add logging for #472

This commit is contained in:
xmflsct 2022-12-03 21:38:35 +01:00
parent 507ecf5eeb
commit 0fd3fcfd3f
1 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import apiInstance from '@api/instance'
import apiTooot, { TOOOT_API_DOMAIN } from '@api/tooot'
import i18n from '@root/i18n/i18n'
import { RootState } from '@root/store'
import * as Sentry from '@sentry/react-native'
import { InstanceLatest } from '@utils/migrations/instances/migration'
import { getInstance } from '@utils/slices/instancesSlice'
import * as Notifications from 'expo-notifications'
@ -72,6 +73,16 @@ const pushRegister = async (
body: formData
})
if (res.body.server_key) {
Sentry.setExtras({
API: 'tooot',
instance: instanceUri,
resBody: res.body
})
Sentry.captureMessage('Push register error')
return Promise.reject()
}
await subscribe({
expoToken,
instanceUrl,