-
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
[WIP] fix: utilize 'error-causes' to create errors for 'signIn' and 'signUp' SDK functions #52
Conversation
You mean, first create errors with named causes in Greenruhm Web so that you can translate them to caused errors here based on the responses from Greenruhm Web? If it saves you time on rework, why not?
You should be able to handle that with the default error response. Error causes has an unexpected error case built-in: const UnexpectedError = {
name: "UnexpectedError",
message: "An unexpected error was thrown",
}; |
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.
It looks like we removed the error handling logic for Magic errors - I assume we're moving that error logic elsewhere. Is this correct? Where did it move to?
Within |
Yes.
Those are the ones with http status codes like One step at a time. |
Closing this PR as I have made an updated one with the |
Description
Questions
error-causes
togreenruhm-web
and have all possible errors generated during sign up witherror-causes
(If so should we come up with a convention for error codes)?NOTE: I have included an
UserRejectedConsentToShareEmail
error so that all errors generated in the existing sign in and sign up flows are created witherror-causes
. In an upcoming PR, we will move away from usingmagic.connect.requestUserInfo()
and this error will no longer be necessary so it can be removed at that point in time.TODO