From 5ab929b0772a9c574971c2357565e79163c9088f Mon Sep 17 00:00:00 2001 From: Jess Bees Date: Fri, 15 Mar 2024 12:59:20 -0400 Subject: [PATCH] Include request id in the error message of an error response --- src/internal/deployment.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal/deployment.js b/src/internal/deployment.js index 4837dfa..89b9e3f 100644 --- a/src/internal/deployment.js +++ b/src/internal/deployment.js @@ -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) {