-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bug/infinite loading #5643
Bug/infinite loading #5643
Conversation
💙 vsf-next-demo successfully deployed at https://bbfdaa6a314d153caac78a67b40a7a65950bf07d.vsf-next-demo.preview.storefrontcloud.io |
Pull Request Test Coverage Report for Build 675572243Details
💛 - Coveralls |
fdff101
to
992c627
Compare
992c627
to
04ca18c
Compare
@@ -63,7 +64,7 @@ export const useUserFactory = <USER, UPDATE_USER_PARAMS, REGISTER_USER_PARAMS ex | |||
user.value = await _factoryParams.register(providedUser); | |||
error.value.register = null; | |||
} catch (err) { | |||
error.value.register = err; | |||
error.value.register = err.response?.data || err; |
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.
just err
- you can't assume graphql in the core
94d5a3b
to
2de98c9
Compare
if (hasUserErrors) { | ||
error.login = userError.value.login; | ||
error.register = userError.value.register; | ||
const loginGraphQLErrorMessage = loginGraphQLError?.graphQLErrors[0]?.message; |
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.
same here - this is core template
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.
Moved error handling CT integration
Related Issues
closes #5508
closes #5463
Short Description of the PR
Fixed problem with infinite loading caused by not having error handing in core/middleware. By implementing try catch, and throwing more accurate error in useUserFactory, now LoginModal is not closing after incorrect register/login attempt and it shows appropriate error. It also allowed to fix another problem related to empty shipping method when there was no shipping methods available.
Screenshots of Visual Changes before/after (if There Are Any)
Pull Request Checklist