From 668f971ba17bc1a7088ae7e066bd6f41bb6faa42 Mon Sep 17 00:00:00 2001 From: mho22 Date: Wed, 1 Apr 2026 16:03:50 +0200 Subject: [PATCH 1/2] Add custom error message when artifact is expired --- packages/playground/website/public/wordpress.html | 4 +++- packages/playground/website/src/github/preview-pr/form.tsx | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/playground/website/public/wordpress.html b/packages/playground/website/public/wordpress.html index f174c7af3f5..814186c1414 100644 --- a/packages/playground/website/public/wordpress.html +++ b/packages/playground/website/public/wordpress.html @@ -1,4 +1,4 @@ - + WordPress PR Previewer @@ -190,6 +190,8 @@ } } else if (error === 'artifact_invalid') { errorDiv.innerText = `The PR ${prNumber} requires a rebase before it can be previewed.`; + } else if (error === 'artifact_expired') { + errorDiv.innerText = `The PR ${prNumber} couldn't be previewed because the CI build artifact has expired. To load that pull request, the author or a maintainer should push a new commit, rebase, or rerun the CI job to trigger a fresh CI build.`; } else { errorDiv.innerText = `The PR ${prNumber} couldn't be previewed due to an unexpected error. Please try again later or fill an issue in the WordPress Playground repository.`; // https://github.com/WordPress/wordpress-playground/issues/new diff --git a/packages/playground/website/src/github/preview-pr/form.tsx b/packages/playground/website/src/github/preview-pr/form.tsx index 5a204dbe7ae..b74a29daf64 100644 --- a/packages/playground/website/src/github/preview-pr/form.tsx +++ b/packages/playground/website/src/github/preview-pr/form.tsx @@ -161,6 +161,10 @@ export default function PreviewPRForm({ setError( `The PR ${ref} requires a rebase before it can be previewed.` ); + } else if (error === 'artifact_expired') { + setError( + `The PR ${ref} couldn't be previewed because the CI build artifact has expired. To load that pull request, the author or a maintainer should push a new commit, rebase, or rerun the CI job to trigger a fresh CI build.` + ); } else { setError( `The PR ${ref} couldn't be previewed due to an unexpected error. Please try again later or fill an issue in the WordPress Playground repository.` From d83c28e5f282890b8fdadc26e7b389708d288364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jake=C5=A1?= Date: Wed, 8 Apr 2026 13:49:39 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20typo:=20"fill=20an=20issue"=20?= =?UTF-8?q?=E2=86=92=20"file=20an=20issue"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/playground/website/public/wordpress.html | 2 +- packages/playground/website/src/github/preview-pr/form.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/playground/website/public/wordpress.html b/packages/playground/website/public/wordpress.html index 814186c1414..540e5399ed7 100644 --- a/packages/playground/website/public/wordpress.html +++ b/packages/playground/website/public/wordpress.html @@ -193,7 +193,7 @@ } else if (error === 'artifact_expired') { errorDiv.innerText = `The PR ${prNumber} couldn't be previewed because the CI build artifact has expired. To load that pull request, the author or a maintainer should push a new commit, rebase, or rerun the CI job to trigger a fresh CI build.`; } else { - errorDiv.innerText = `The PR ${prNumber} couldn't be previewed due to an unexpected error. Please try again later or fill an issue in the WordPress Playground repository.`; + errorDiv.innerText = `The PR ${prNumber} couldn't be previewed due to an unexpected error. Please try again later or file an issue in the WordPress Playground repository.`; // https://github.com/WordPress/wordpress-playground/issues/new } submitting = false; diff --git a/packages/playground/website/src/github/preview-pr/form.tsx b/packages/playground/website/src/github/preview-pr/form.tsx index b74a29daf64..8cb2fe61ff7 100644 --- a/packages/playground/website/src/github/preview-pr/form.tsx +++ b/packages/playground/website/src/github/preview-pr/form.tsx @@ -167,7 +167,7 @@ export default function PreviewPRForm({ ); } else { setError( - `The PR ${ref} couldn't be previewed due to an unexpected error. Please try again later or fill an issue in the WordPress Playground repository.` + `The PR ${ref} couldn't be previewed due to an unexpected error. Please try again later or file an issue in the WordPress Playground repository.` ); // https://github.com/WordPress/wordpress-playground/issues/new }