mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-08 08:06:15 +00:00
Include request id in the error message of an error response
This commit is contained in:
@@ -99,6 +99,9 @@ class Deployment {
|
||||
// build customized error message based on server response
|
||||
if (error.response) {
|
||||
let errorMessage = `Failed to create deployment (status: ${error.status}) with build version ${this.buildVersion}.`
|
||||
if (error.response.headers['x-github-request-id']) {
|
||||
errorMessage += ` Request ID ${error.response.headers['x-github-request-id']}`
|
||||
}
|
||||
if (error.status === 400) {
|
||||
errorMessage += ` Responded with: ${error.message}`
|
||||
} else if (error.status === 403) {
|
||||
|
||||
Reference in New Issue
Block a user