Skip to content

Commit 5ab929b

Browse files
committed
Include request id in the error message of an error response
1 parent 3ff795b commit 5ab929b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/internal/deployment.js

+3
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
let errorMessage = `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
} else if (error.status === 403) {

0 commit comments

Comments
 (0)