From 30942cc4ae0fb74359ce2506312557474d5219ee Mon Sep 17 00:00:00 2001 From: eggyhead <28715808+eggyhead@users.noreply.github.com> Date: Thu, 18 Jan 2024 04:10:35 +0000 Subject: [PATCH 1/3] updating artifact not found error message to include more information and link to FAQ --- packages/artifact/src/internal/find/get-artifact.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/artifact/src/internal/find/get-artifact.ts b/packages/artifact/src/internal/find/get-artifact.ts index b19e5d6e..a7b9f1b3 100644 --- a/packages/artifact/src/internal/find/get-artifact.ts +++ b/packages/artifact/src/internal/find/get-artifact.ts @@ -49,7 +49,9 @@ export async function getArtifactPublic( if (getArtifactResp.data.artifacts.length === 0) { throw new ArtifactNotFoundError( - `Artifact not found for name: ${artifactName}` + `Artifact not found for name: ${artifactName}\n + Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.\n + For more information, visit the Github Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` ) } From 5016db01fee4300348d9078e3a3d8ac4d8bb3d4d Mon Sep 17 00:00:00 2001 From: eggyhead <28715808+eggyhead@users.noreply.github.com> Date: Thu, 18 Jan 2024 04:14:39 +0000 Subject: [PATCH 2/3] update message for internal method --- packages/artifact/src/internal/find/get-artifact.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/artifact/src/internal/find/get-artifact.ts b/packages/artifact/src/internal/find/get-artifact.ts index a7b9f1b3..cbc5f137 100644 --- a/packages/artifact/src/internal/find/get-artifact.ts +++ b/packages/artifact/src/internal/find/get-artifact.ts @@ -91,7 +91,9 @@ export async function getArtifactInternal( if (res.artifacts.length === 0) { throw new ArtifactNotFoundError( - `Artifact not found for name: ${artifactName}` + `Artifact not found for name: ${artifactName}\n + Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.\n + For more information, visit the Github Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` ) } From cca96584eb4a246c50525990eb9e47d513a3ef7c Mon Sep 17 00:00:00 2001 From: eggyhead <28715808+eggyhead@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:57:21 +0000 Subject: [PATCH 3/3] removing newline and camelcasing GitHub --- packages/artifact/src/internal/find/get-artifact.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/artifact/src/internal/find/get-artifact.ts b/packages/artifact/src/internal/find/get-artifact.ts index cbc5f137..900f9b8d 100644 --- a/packages/artifact/src/internal/find/get-artifact.ts +++ b/packages/artifact/src/internal/find/get-artifact.ts @@ -49,9 +49,9 @@ export async function getArtifactPublic( if (getArtifactResp.data.artifacts.length === 0) { throw new ArtifactNotFoundError( - `Artifact not found for name: ${artifactName}\n - Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.\n - For more information, visit the Github Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` + `Artifact not found for name: ${artifactName} + Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. + For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` ) } @@ -91,9 +91,9 @@ export async function getArtifactInternal( if (res.artifacts.length === 0) { throw new ArtifactNotFoundError( - `Artifact not found for name: ${artifactName}\n - Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.\n - For more information, visit the Github Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` + `Artifact not found for name: ${artifactName} + Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. + For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md` ) }