Skip to content

[Website] Add custom error message when artifact is expired#3453

Merged
JanJakes merged 2 commits intotrunkfrom
add-custom-error-message-for-artifact-expiration
Apr 8, 2026
Merged

[Website] Add custom error message when artifact is expired#3453
JanJakes merged 2 commits intotrunkfrom
add-custom-error-message-for-artifact-expiration

Conversation

@mho22
Copy link
Copy Markdown
Collaborator

@mho22 mho22 commented Apr 1, 2026

Motivation for the change, related issues

A WordCamp Nice 2026 contributor asked why this was crashing :

https://playground.wordpress.net/wordpress.html?pr=9026

I found out the CI build artifact for that pull request was 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.

Implementation details

  • Added a new custom error message.

Testing Instructions (or ideally a Blueprint)

  1. npm run dev
  2. Go to http://localhost:5400/website-server/wordpress.html?pr=9026

On Playground

remote-screenshot

Locally

local-screenshot

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a clearer, actionable error message when a PR preview fails because the CI artifact has expired, so users understand how to regenerate the artifact and retry.

Changes:

  • Handle artifact_expired errors with a custom message in the React PR preview form.
  • Handle artifact_expired errors with a custom message in the static wordpress.html PR previewer page.
  • Updates the HTML doctype casing/formatting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/playground/website/src/github/preview-pr/form.tsx Adds a dedicated artifact_expired branch with a tailored error message in the web UI.
packages/playground/website/public/wordpress.html Adds the same artifact_expired message for the static previewer and changes the doctype line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description focuses on adding a custom error message, but this diff also changes the doctype line (casing/formatting). If this isn’t required for the error-message behavior, consider reverting it to keep the PR minimal and avoid unrelated churn/merge conflicts.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be produced by the npm run format pre-commit hook.

@mho22 mho22 force-pushed the add-custom-error-message-for-artifact-expiration branch from 291ca36 to 668f971 Compare April 1, 2026 14:20
Copy link
Copy Markdown
Member

@JanJakes JanJakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mho22 Looks and works good, thanks! I noticed an unrelated typo in the existing code, so I pushed one more commit to address that.

@mho22
Copy link
Copy Markdown
Collaborator Author

mho22 commented Apr 8, 2026

@JanJakes Thanks!

@JanJakes JanJakes merged commit 2509c21 into trunk Apr 8, 2026
92 of 93 checks passed
@JanJakes JanJakes deleted the add-custom-error-message-for-artifact-expiration branch April 8, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants