Clearing expired preview site shows unnecessary error#2943
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing 21be50d vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
epeicher
approved these changes
Mar 31, 2026
Contributor
There was a problem hiding this comment.
Thanks @katinthehatsite for solving this! I have not been able to reproduce the issue, as I think the error is correctly handled here. This code prevents a request from being made if the site has already expired, so we are improving with this change. I am accepting this, and it can be landed. LGTM!
I have committed two lint fixes so once the CI passes, this could be merged.
Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev>
Contributor
Author
|
Thanks for cleaning up the logs @epeicher ! |
fredrikekelund
added a commit
that referenced
this pull request
Apr 2, 2026
* Ensure that expires screenshots don't hit the api * Fix lint errors * Delete debug log Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev> --------- Co-authored-by: Kateryna Kodonenko <kateryna@automattic.com> Co-authored-by: Roberto Aranda <roberto.aranda@automattic.com> Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev>
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.

Related issues
Fixes STU-1471
How AI was used in this PR
I debated two different solutions with AI before picking an option.
Proposed Changes
This PR ensures that when an expired preview site is to be
Clear, we are not making the API request.Testing Instructions
I was not able to reproduce the exact error shown in the issue but I think this approach should handle the issue:
wpcom/v2,POST,/jurassic-ninja,deleteidin https://mc.a8c.com/tools/jn-report-card/ )Networktab in the consoleClearCLI configPre-merge Checklist