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

Refine error logging

Previous attempt resulted in truncated error object which is not readable
This commit is contained in:
xmflsct
2022-12-05 19:24:03 +01:00
parent db6ef36278
commit 210b34304c
6 changed files with 75 additions and 54 deletions

View File

@ -1,4 +1,5 @@
import apiGeneral from '@api/general'
import { handleError } from '@api/helpers'
import apiTooot from '@api/tooot'
import { displayMessage } from '@components/Message'
import navigationRef from '@helpers/navigationRef'
@ -33,11 +34,8 @@ const pushUseConnect = () => {
})
.then(() => Notifications.setBadgeCountAsync(0))
.catch(error => {
Sentry.setContext('Error response', {
...(error?.response && { response: error.response?._response })
})
Sentry.setContext('Error object', { error })
Sentry.captureMessage('Push connect error')
handleError({ message: 'Push connect error', captureResponse: true })
Notifications.setBadgeCountAsync(0)
if (error?.status == 404) {
displayMessage({