diff --git a/src/__tests__/internal/deployment.test.js b/src/__tests__/internal/deployment.test.js index 7463283..d46ab04 100644 --- a/src/__tests__/internal/deployment.test.js +++ b/src/__tests__/internal/deployment.test.js @@ -194,6 +194,11 @@ describe('Deployment', () => { ) expect(core.error).toHaveBeenNthCalledWith( 1, + 'Listing artifact metadata failed', + new Error('Failed to ListArtifacts: Received non-retryable error: Failed request: (400) null: yikes!') + ) + expect(core.error).toHaveBeenNthCalledWith( + 2, 'Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages, or Actions? Please re-run the deployment at a later time.', expect.any(Error) ) @@ -416,6 +421,11 @@ describe('Deployment', () => { ) expect(core.error).toHaveBeenNthCalledWith( 1, + 'Listing artifact metadata failed', + new Error('Failed to ListArtifacts: Received non-retryable error: Failed request: (501) null: oh no') + ) + expect(core.error).toHaveBeenNthCalledWith( + 2, 'Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages, or Actions? Please re-run the deployment at a later time.', expect.any(Error) ) diff --git a/src/internal/api-client.js b/src/internal/api-client.js index caec312..d64d412 100644 --- a/src/internal/api-client.js +++ b/src/internal/api-client.js @@ -70,6 +70,7 @@ async function getArtifactMetadata({ artifactName }) { const twirpResponse = await artifactClient.listArtifacts() response = wrapTwirpResponseLikeOctokit(twirpResponse, requestOptions) } catch (twirpError) { + core.error('Listing artifact metadata failed', twirpError) const octokitError = wrapTwirpErrorLikeOctokit(twirpError, requestOptions) throw octokitError }