Skip to content

Commit d6db901

Browse files
authored
Merge pull request #324 from actions/error-message-request-id
On API error, show the request ID of the API request
2 parents 3ff795b + 055f425 commit d6db901

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

‎coverage_badge.svg‎

Lines changed: 1 addition & 1 deletion
Loading

‎dist/index.js‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/internal/deployment.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ class Deployment{
9999
// build customized error message based on server response
100100
if(error.response){
101101
leterrorMessage=`Failed to create deployment (status: ${error.status}) with build version ${this.buildVersion}.`
102+
if(error.response.headers['x-github-request-id']){
103+
errorMessage+=` Request ID ${error.response.headers['x-github-request-id']}`
104+
}
102105
if(error.status===400){
103106
errorMessage+=` Responded with: ${error.message}`
104107
}elseif(error.status===403){

0 commit comments

Comments
(0)