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

fix(admin-ui): fix analytics config not being saved in invite form #5467

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

shahednasser
Copy link
Member

What

Remove the feature flag check for analytics in invite form and always try to send a request to the create analytics config endpoint.

Why

As the user is not authenticated when they accept an invite, the request to /admin/store that's meant to retrieve enabled feature flags will result in 401. So, the check on whether the feature flag is enabled before creating the analytics configuration for the user will always be false, and the configuration will never be created.

With this fix, we always try to create analytics configuration for the user. If the analytics feature flag is disabled, which leads to the Create Analytics Config route not being registered and resulting in a 404 error, we gracefully catch the error without disrubting the invite flow.

@shahednasser shahednasser requested a review from a team as a code owner October 25, 2023 07:25
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: e3aeca5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/admin-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Oct 25, 2023 7:25am
docs-ui ⬜️ Ignored (Inspect) Oct 25, 2023 7:25am
medusa-docs ⬜️ Ignored (Inspect) Oct 25, 2023 7:25am

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