-
Notifications
You must be signed in to change notification settings - Fork 134
[Log in] Parse error related to public-api.wordpress.com availability #14472
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
[Log in] Parse error related to public-api.wordpress.com availability #14472
Conversation
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.
Pull Request Overview
This PR improves error handling for WordPress.com connectivity issues during the login process by introducing a specific error type and user-friendly message when the app cannot reach public-api.wordpress.com.
Key changes:
- Adds specific error handling for WordPress.com connectivity issues during site discovery
- Implements logic to detect network errors related to public-api.wordpress.com
- Provides clearer error messaging to users when WordPress.com is unreachable
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
libs/login/src/main/res/values/strings.xml | Adds new error message string for WordPress.com connectivity issues |
libs/login/src/main/java/org/wordpress/android/login/LoginSiteAddressFragment.java | Updates error handling to show specific message for WordPress.com connectivity errors |
libs/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.kt | Adds new WORDPRESS_COM_CONNECTIVITY_ERROR enum value |
libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/site/SiteRestClient.kt | Implements detection logic for WordPress.com connectivity issues and error classification |
WooCommerce/src/main/res/values/strings.xml | Adds duplicate error message string for WooCommerce app |
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/sitepicker/sitediscovery/SitePickerSiteDiscoveryViewModel.kt | Updates error handling in site picker to use new connectivity error type |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/site/SiteRestClient.kt
Show resolved
Hide resolved
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #14472 +/- ##
============================================
- Coverage 37.82% 37.82% -0.01%
Complexity 9221 9221
============================================
Files 2004 2004
Lines 112928 112945 +17
Branches 14908 14915 +7
============================================
+ Hits 42715 42716 +1
- Misses 66326 66342 +16
Partials 3887 3887 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ile-app-login-when-dns
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.
LGTM, thanks!
WP API (public-api.wordpress.com) availability error handling
WOOMOB-924
Description
This PR adds parsing of the API error related to
*.wordpress.com
resources being unavailable, which can be related to DNS service blocking the WP domain.Steps to reproduce
In order to block
public-api.wordpress.com
, you can use various tools, like local DNS Service implementation or specialized apps, e.g. Rethink DNS.Important part is to block access to
*.wordpress.com
domains.Next, try to log-in to the app and notice the error message is not quite appropriate.
Testing information
*.wordpress.com
domainThe tests that have been performed
Above
Images/gif
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.