-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sentry #84
add sentry #84
Conversation
src/helpers/handleError.ts
Outdated
const message = parseError(e) | ||
if (sendToSentry) { | ||
if (e instanceof Error) { | ||
console.log('catch') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
export function initSentry() { | ||
Sentry.init({ | ||
dsn: env.VITE_SENTRY_DSN, | ||
environment: process.env.NODE_ENV, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't have it in vite/browser, make sure it logs dev/prod correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/helpers/parseError.ts
Outdated
} | ||
|
||
export function stringifyError(e: unknown) { | ||
if (typeof e === 'undefined') return e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should return something else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If undefined
we should provide some default text/error, I think
@@ -19,5 +19,6 @@ export default cleanEnv(import.meta.env, { | |||
VITE_KETL_INVITES_BACKEND: str({ | |||
default: KETL_INVITES_BACKEND, | |||
}), | |||
VITE_SENTRY_DSN: str(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update env file in the 1Pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
src/helpers/parseError.ts
Outdated
} | ||
|
||
export function stringifyError(e: unknown) { | ||
if (typeof e === 'undefined') return e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If undefined
we should provide some default text/error, I think
No description provided.