Skip to content

Commit

Permalink
Fix variables to pull from
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Dec 30, 2020
1 parent 554fe98 commit 3f5a53a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions x-pack/plugins/actions/server/builtin_action_types/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,13 @@ export async function executor(

if (error.response) {
const {
status: statusCode,
statusText: errorText,
headers: responseHeaders,
data: { statusCode, error: errorText, message: errorMessage },
data: { message: errorMessage },
} = error.response;
const message = `[${statusCode}] ${errorText}: ${errorMessage}`;
const errorMessageAsSuffix = errorMessage ? `: ${errorMessage}` : '';
const message = `[${statusCode}] ${errorText}${errorMessageAsSuffix}`;
logger.error(`error on ${actionId} webhook event: ${message}`);
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
Expand Down

0 comments on commit 3f5a53a

Please sign in to comment.