Clean up some sentry logs (#2630)

* Change prop name for sentry ingestion

* Fix test

* Add default object
This commit is contained in:
Eric Bailey 2024-01-25 23:11:01 -06:00 committed by GitHub
parent 3371038f7d
commit bc502edae1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 84 additions and 147 deletions

View file

@ -116,7 +116,7 @@ export function Component({}: {}) {
}
} catch (e) {
Toast.show(_(msg`Failed to create app password.`), 'times')
logger.error('Failed to create app password', {error: e})
logger.error('Failed to create app password', {message: e})
}
}

View file

@ -43,7 +43,7 @@ function Inner({preferences}: {preferences: UsePreferencesQueryResponse}) {
await setBirthDate({birthDate: date})
closeModal()
} catch (e) {
logger.error(`setBirthDate failed`, {error: e})
logger.error(`setBirthDate failed`, {message: e})
}
}, [date, setBirthDate, closeModal])

View file

@ -121,7 +121,7 @@ export function Inner({
onChanged()
} catch (err: any) {
setError(cleanError(err))
logger.error('Failed to update handle', {handle, error: err})
logger.error('Failed to update handle', {handle, message: err})
} finally {
}
}, [

View file

@ -125,7 +125,7 @@ function AdultContentEnabledPref() {
Toast.show(
_(msg`There was an issue syncing your preferences with the server`),
)
logger.error('Failed to update preferences with server', {error: e})
logger.error('Failed to update preferences with server', {message: e})
}
}, [variables, preferences, mutate, _])

View file

@ -129,7 +129,7 @@ export function Component({
onUpdate?.()
closeModal()
} catch (e: any) {
logger.error('Failed to update user profile', {error: String(e)})
logger.error('Failed to update user profile', {message: String(e)})
}
}, [
track,