Skip to content

Commit

Permalink
fix: remove unhelpful logging
Browse files Browse the repository at this point in the history
The Sentry alert that is triggered as a result
of this log is not actionable nor does
anyone seem to concerned about. So we should
probably remove it ¯\_(ツ)_/¯
  • Loading branch information
thisislawatts committed Nov 25, 2021
1 parent fc589ae commit bc97d97
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/common/errors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import * as Sentry from '@sentry/react'
import { SENTRY_CONFIG } from '../config/config'

export const logToSentry = {
message: Sentry.captureMessage,
event: Sentry.captureEvent,
exception: Sentry.captureException,
}

export const initErrorHandler = () => {
const { location } = window
if (
Expand Down
6 changes: 0 additions & 6 deletions src/stores/User/user.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { RootStore } from '..'
import { ModuleStore } from '../common/module.store'
import { IConvertedFileMeta } from 'src/components/ImageInput/ImageInput'
import { formatLowerNoSpecial } from 'src/utils/helpers'
import { logToSentry } from 'src/common/errors'

/*
The user store listens to login events through the firebase api and exposes logged in user information via an observer.
Expand Down Expand Up @@ -92,11 +91,6 @@ export class UserStore extends ModuleStore {
.doc(userMeta._id)
.set({ ...userMeta, _lastActive: new Date().toISOString() })
} else {
// user profile not found, either it has been deleted or not migrated correctly from legacy format
// create a new profile to use for now and make a log to the error handler in case required
logToSentry.message(
`Could not find user profile [${user.uid} - ${user.email} - ${user.metadata}]. New profile created instead`,
)
await this.createUserProfile()
// now that a profile has been created, run this function again (use `newUserCreated` to avoid inf. loop in case not create not working correctly)
if (!newUserCreated) {
Expand Down

0 comments on commit bc97d97

Please sign in to comment.