Skip to content

Commit

Permalink
Make sure to do not use error as key for senty log context
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Sep 21, 2023
1 parent d6a4959 commit c2bdb02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const MultiFileSelect: FC<MultiFileSelectProps> = memo(
} else if (errorCode === 'file-too-large') {
setError('File too large')
} else {
SentryLogger.error('Unknown file select error', 'MultiFileSelect', null, { error: { code: errorCode } })
SentryLogger.error('Unknown file select error', 'MultiFileSelect', null, { parsedError: { code: errorCode } })
setError('Unknown error')
}
}, [])
Expand Down
4 changes: 3 additions & 1 deletion packages/atlas/src/hooks/useCreateMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ export const useCreateMember = () => {

const errorCode = isAxiosError<NewMemberErrorResponse>(error) ? error.response?.data?.error : null

SentryLogger.error('Failed to create a membership', 'SignUpModal', error, { error: { errorCode } })
SentryLogger.error(`Failed to create a membership ${ytResponseData ? 'YPP' : ''}`, 'SignUpModal', error, {
parsed: { errorCode },
})

switch (errorCode) {
case 'TooManyRequestsPerIp':
Expand Down

0 comments on commit c2bdb02

Please sign in to comment.