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

Show generic error when fetching site-url/wp-json namespaces is empty during site credentials login #12813

Open
JorgeMucientes opened this issue Oct 23, 2024 · 1 comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication. priority: low Not many people are affected or there’s a workaround, etc.

Comments

@JorgeMucientes
Copy link
Contributor

Currently, if site namespaces are hidden due to some hosting provider configuration or security plugin, if the user attempt to log into the app they'll see the following error even for WooCommerce sites:

The error is misleading. The proposal is to update this piece of code from SiteWPAPIRestClient.kt:

                    hasWooCommerce = response?.namespaces?.any {
                        it.startsWith(WOO_API_NAMESPACE_PREFIX)
                    } ?: false

and simply return an error if response?.namespaces is empty.

@JorgeMucientes JorgeMucientes added type: enhancement A request for an enhancement. priority: low Not many people are affected or there’s a workaround, etc. labels Oct 23, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 23, 2024

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

@JorgeMucientes JorgeMucientes added feature: login Related to any part of the log in or sign in flow, or authentication. and removed type: enhancement A request for an enhancement. labels Oct 23, 2024
@JorgeMucientes JorgeMucientes changed the title Show generic error when fetching site/wp-json namespaces is empty. Show generic error when fetching site-url/wp-json namespaces is empty during site credentials login Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication. priority: low Not many people are affected or there’s a workaround, etc.
Projects
None yet
Development

No branches or pull requests

2 participants