From 10bd0f2931c94dfe1172e4d78aa8db810ceb4263 Mon Sep 17 00:00:00 2001 From: andrurodr Date: Fri, 4 Mar 2022 12:54:42 -0300 Subject: [PATCH] try --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 06067b19..af16f4fc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { endGroup, startGroup } from '@actions/core' import * as github from '@actions/github' -import axios, { AxiosRequestConfig } from 'axios' +import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' import { formatEvent } from './format' import { getInputs, Inputs, statusOpts } from './input' import { logDebug, logError, logInfo } from './utils' @@ -40,6 +40,10 @@ function wrapWebhook(webhook: string, payload: Object): Promise { logInfo(JSON.stringify(config)) return config }) + client.interceptors.response.use((axiosResponse: AxiosResponse) => { + logInfo(JSON.stringify(axiosResponse)) + return axiosResponse + }) await client.post(webhook, payload) } catch(e: any) { if (e.response) {