-
-
Notifications
You must be signed in to change notification settings - Fork 268
chore: seedless error with causes details #7660
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
base: main
Are you sure you want to change the base?
Conversation
add testcases
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
| cause: | ||
| this.cause instanceof Error | ||
| ? { name: this.cause.name, message: this.cause.message } | ||
| : this.cause, |
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.
Details lost in nested error serialization
Medium Severity
The toJSON method only serializes name and message from the cause property, losing the details property when the cause is itself a SeedlessOnboardingError. Since details provides "additional context about the error beyond the message" for debugging, this context is lost when errors are chained, undermining the debugging purpose of both the details and cause properties in logging and error tracking systems.
Explanation
Adds a new generic SeedlessOnboardingError class to handle errors in the SeedlessOnboardingController that don't fit the more specific PasswordSyncError or RecoveryError classes.
Changes
References
Checklist
Note
Introduces a generic, serializable error type and adopts it in authentication flow.
SeedlessOnboardingErrorwithdetails,causehandling (Error/string/object), andtoJSON()for structured loggingauthenticatewithSeedlessOnboardingError(AuthenticationError)preserving original error viacauseSeedlessOnboardingErrorfrom package indexWritten by Cursor Bugbot for commit a7d521f. This will update automatically on new commits. Configure here.