From 2329d5dd80527a1b9ba3b8372ba6dc2768052b14 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Wed, 31 Jul 2024 15:16:44 +1200 Subject: [PATCH] fix: debug with whole object --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ceaf1f0..5bc27a4 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,8 @@ import core from "@actions/core"; import { makeBadge } from "badge-maker"; +const util = require('util') + const hostUrl = new URL(core.getInput("host")); // This uses the method above to update a gist with the given data. The user agent is @@ -28,7 +30,7 @@ async function updateBadge(body) { }); if (!response.ok) { - console.log(`Fetching badge failed: ${response}`); + console.log(`Fetching badge failed: ${console.log(util.inspect(response, false, null, true /* enable colors */))}`); if (response.status === 409) { // This means likely the badge already exists. Try to patch response = await fetch(hostUrl, {