Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: collateral password issue [LW-11953] #1584
fix: collateral password issue [LW-11953] #1584
Changes from all commits
6650980
f3a977c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
console.error is commonly used in the lace codebase, so I think it's fine.
But in the same time I wonder if this is the way we should handle it. Especially as we have Sentry in place.
Maybe we do not need to pollute users console with application error, but report them to Sentry, so in this case
throw new Error('EnterPassword: password is undefined')
maybe a bit better.It can be as it is, no need to change it right now, but it's worth exploring this area in upcoming weeks, so we can refactor.
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 need to be careful with throwing errors in react code, as it might unmount the whole app, as we don't have any error boundary as far as I know. The disappearing application would be a far more severe issue than the benefit of catching the problem with sentry.
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 are methods like captureException and captureMessage in Sentry https://docs.sentry.io/platforms/javascript/guides/react/usage/
we may be interested to use. We could wrap it into some abstraction layer so we are provider agnostic etc
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.
Definitely worth exploring. I just want to mention that I would prefer to have a seamless implementation instead of some function that I need to explicitly call in order to register the exception in sentry. I would like to stick to native mechanism - just throw an error that would be catched at some higher level and reported, instead of remembering that I need to pass it to some function.