mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-09 00:26:14 +00:00
Log the more raw error message from Twirp
This commit is contained in:
@@ -194,6 +194,11 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
expect(core.error).toHaveBeenNthCalledWith(
|
expect(core.error).toHaveBeenNthCalledWith(
|
||||||
1,
|
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.',
|
'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)
|
expect.any(Error)
|
||||||
)
|
)
|
||||||
@@ -416,6 +421,11 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
expect(core.error).toHaveBeenNthCalledWith(
|
expect(core.error).toHaveBeenNthCalledWith(
|
||||||
1,
|
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.',
|
'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)
|
expect.any(Error)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ async function getArtifactMetadata({ artifactName }) {
|
|||||||
const twirpResponse = await artifactClient.listArtifacts()
|
const twirpResponse = await artifactClient.listArtifacts()
|
||||||
response = wrapTwirpResponseLikeOctokit(twirpResponse, requestOptions)
|
response = wrapTwirpResponseLikeOctokit(twirpResponse, requestOptions)
|
||||||
} catch (twirpError) {
|
} catch (twirpError) {
|
||||||
|
core.error('Listing artifact metadata failed', twirpError)
|
||||||
const octokitError = wrapTwirpErrorLikeOctokit(twirpError, requestOptions)
|
const octokitError = wrapTwirpErrorLikeOctokit(twirpError, requestOptions)
|
||||||
throw octokitError
|
throw octokitError
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user