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) {