[Troubleshoot] Test CI Failure with #23028 focusing on Detekt#23033
Closed
ParaskP7 wants to merge 7 commits into
Closed
[Troubleshoot] Test CI Failure with #23028 focusing on Detekt#23033ParaskP7 wants to merge 7 commits into
ParaskP7 wants to merge 7 commits into
Conversation
* Map rs media upload failures to specific error types The Application-Password REST upload path collapsed four distinct rs failures (HTTP status, WpError, execution failure, unknown) into a single GENERIC_ERROR, hiding the cause and showing users an unhelpful generic snackbar. Map by HTTP status and transport reason, and record status/code/reason in logMessage so reports are diagnosable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Satisfy detekt: extract error-parsing helpers and suppress LargeClass Split parseMediaError's network-error branches into small helper functions to stay under the LongMethod and CyclomaticComplexity thresholds, and mark the growing test class with @Suppress("LargeClass") to match the sibling TaxonomyRsApiRestClientTest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Extract shared buildMediaError helper to dedupe error parsers The four parse* helpers repeated the same MediaError.apply construction. Centralize it in buildMediaError, which also unifies the nullable statusCode handling. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Reuse MediaErrorType.fromHttpStatusCode and align 403 handling Replace the duplicated private HTTP-status mapper in MediaRSApiRestClient with the canonical MediaErrorType.fromHttpStatusCode, reconciling 403 to NOT_AUTHENTICATED (was AUTHORIZATION_REQUIRED) and restoring 400 -> BAD_REQUEST. Generalize fromHttpStatusCode's 500 case to the full 5xx range and make the execution-reason mapping exhaustive so new upstream RequestExecutionErrorReason variants surface as compile errors. Extend NOT_AUTHENTICATED handling through EditPostActivity, GutenbergKitActivity, and WPMediaUtils so 403s still show the no-permission message. Add tests for the 5xx range and forbidden execution reason. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Prepend internal Reposilite proxy (http://10.0.2.215:8080/maven-central) to dependencyResolutionManagement repositories, guarded by gradle.ext.isCi. Enable allowInsecureProtocol since the mirror is served over plain HTTP. FYI: Copy-pasted commit from #23018.
…anagement" This reverts commit 3c48f6d.
Contributor
|
|
Contributor
|
|
Base automatically changed from
cherry-pick/media-upload-error-mapping-26.9
to
release/26.9
June 24, 2026 11:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Testing instructions