Skip to content

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

@JorgeMucientes

Description

@JorgeMucientes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidKiwifeature: loginRelated to any part of the log in or sign in flow, or authentication.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions