Merge pull request #773 from ente-io/fix-uncaught-expection-missing-user-id
fix-uncaught-expection-missing-user id
This commit is contained in:
commit
1b45b8447b
|
@ -13,7 +13,6 @@ const SENTRY_ENV = getSentryENV();
|
|||
const SENTRY_RELEASE = getSentryRelease();
|
||||
const IS_ENABLED = getIsSentryEnabled();
|
||||
|
||||
Sentry.setUser({ id: getSentryUserID() });
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
enabled: IS_ENABLED,
|
||||
|
@ -39,3 +38,9 @@ Sentry.init({
|
|||
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
||||
// that it will also get attached to your source maps
|
||||
});
|
||||
|
||||
const main = async () => {
|
||||
Sentry.setUser({ id: await getSentryUserID() });
|
||||
};
|
||||
|
||||
main();
|
||||
|
|
|
@ -6,6 +6,8 @@ import {
|
|||
getIsSentryEnabled,
|
||||
} from 'constants/sentry';
|
||||
|
||||
import { getSentryUserID } from 'utils/user';
|
||||
|
||||
const SENTRY_DSN = getSentryDSN();
|
||||
const SENTRY_ENV = getSentryENV();
|
||||
const SENTRY_RELEASE = getSentryRelease();
|
||||
|
@ -18,3 +20,9 @@ Sentry.init({
|
|||
release: SENTRY_RELEASE,
|
||||
autoSessionTracking: false,
|
||||
});
|
||||
|
||||
const main = async () => {
|
||||
Sentry.setUser({ id: await getSentryUserID() });
|
||||
};
|
||||
|
||||
main();
|
||||
|
|
Loading…
Reference in a new issue