Skip to content

Commit ef3f4dd

Browse files
committed
Log the failed request in the all-domains error path
The FluxC implementation logged `result.error.message`; the wordpress-rs version logged only a constant string, leaving no status code, URL, or reason to triage a failure with. Use `toLogErrorString()`, which formats each `WpRequestResult` failure variant for diagnostics.
1 parent 913fd01 commit ef3f4dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

WordPress/src/main/java/org/wordpress/android/ui/domains/usecases/FetchAllDomainsUseCase.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.wordpress.android.networking.restapi.WpComApiClientProvider
55
import org.wordpress.android.util.AppLog
66
import rs.wordpress.api.kotlin.WpComApiClient
77
import rs.wordpress.api.kotlin.WpRequestResult
8+
import rs.wordpress.api.kotlin.toLogErrorString
89
import uniffi.wp_api.AllDomainItem
910
import uniffi.wp_api.AllDomainsParams
1011
import javax.inject.Inject
@@ -40,7 +41,8 @@ class FetchAllDomainsUseCase @Inject constructor(
4041
else -> {
4142
AppLog.e(
4243
AppLog.T.API,
43-
"An error occurred while fetching all domains"
44+
"An error occurred while fetching all domains: " +
45+
result.toLogErrorString()
4446
)
4547
AllDomains.Error
4648
}

0 commit comments

Comments
 (0)