Skip to content
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

FE New User Flow #36

Merged
merged 9 commits into from
Jan 18, 2024
Merged

FE New User Flow #36

merged 9 commits into from
Jan 18, 2024

Conversation

pcatkins
Copy link
Contributor

  • New unit test for partial user create success
  • Route protection for /new-user routes
  • Get user and create user API calls
  • Check for existing user, show dashboard or new-user page accordingly

@pcatkins pcatkins requested a review from ytqsl January 17, 2024 20:59

// Check if the response has data and userInfo property
return response?.data?.userInfo ?? null;
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be more specific catch on 404?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes can do. It doesn't change much as far as handling the error at this point. We still need to identify how we want to handle errors FE moving forward (alert/toast user, log?, etc.).

Adjusted to add catch 404

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not exactly - 404 here has a true meaning: that user was not found, hence it is a new user

@pcatkins pcatkins requested a review from ytqsl January 18, 2024 01:10
@pcatkins pcatkins merged commit 434e585 into master Jan 18, 2024
4 checks passed
@pcatkins pcatkins deleted the tasks/ECER-652 branch January 18, 2024 01:40
@pcatkins pcatkins restored the tasks/ECER-652 branch January 18, 2024 04:07
@pcatkins pcatkins deleted the tasks/ECER-652 branch January 18, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants