1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2022-02-14 22:10:07 +01:00
parent e388ce7626
commit 06db0580cd
6 changed files with 24 additions and 22 deletions

View File

@ -58,14 +58,14 @@ const apiGeneral = async <T = unknown>({
})
})
.catch(error => {
if (sentry && Math.random() < 0.01) {
Sentry.Native.setExtras({
API: 'general',
...(error.response && { response: error.response }),
...(error.request && { request: error.request })
})
Sentry.Native.captureException(error)
}
// if (sentry && Math.random() < 0.01) {
// Sentry.Native.setExtras({
// API: 'general',
// ...(error.response && { response: error.response }),
// ...(error.request && { request: error.request })
// })
// Sentry.Native.captureException(error)
// }
if (error.response) {
// The request was made and the server responded with a status code

View File

@ -98,14 +98,14 @@ const apiInstance = async <T = unknown>({
})
})
.catch(error => {
if (Math.random() < 0.001) {
Sentry.Native.setExtras({
API: 'instance',
...(error.response && { response: error.response }),
...(error.request && { request: error.request })
})
Sentry.Native.captureException(error)
}
// if (Math.random() < 0.001) {
// Sentry.Native.setExtras({
// API: 'instance',
// ...(error.response && { response: error.response }),
// ...(error.request && { request: error.request })
// })
// Sentry.Native.captureException(error)
// }
if (error.response) {
// The request was made and the server responded with a status code