Use logger.error instead of rethrow (#3323)

zio/stable
dan 2024-03-21 21:39:19 +00:00 committed by GitHub
parent 4d50aac4ee
commit df7f9856bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import {
useGate as useStatsigGate, useGate as useStatsigGate,
} from 'statsig-react-native-expo' } from 'statsig-react-native-expo'
import {logger} from '#/logger'
import {useSession} from '../../state/session' import {useSession} from '../../state/session'
import {LogEvents} from './events' import {LogEvents} from './events'
@ -56,10 +57,7 @@ export function logEvent<E extends keyof LogEvents>(
} }
} catch (e) { } catch (e) {
// A log should never interrupt the calling code, whatever happens. // A log should never interrupt the calling code, whatever happens.
// Rethrow on a clean stack. logger.error('Failed to log an event', {message: e})
setTimeout(() => {
throw e
})
} }
} }