From e4a80292963753833744f0de5436d2f8d704f01e Mon Sep 17 00:00:00 2001 From: Raunak Gurud Date: Wed, 31 Jan 2024 12:08:22 +0530 Subject: [PATCH] refactor: #17 --- dist/index.js | 1 + src/index.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 0633449..c14bfa3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59383,6 +59383,7 @@ async function run() { const hashnode_key = (0, core_1.getInput)("hashnode_key"); (0, core_1.setSecret)(hashnode_key); const response = await (0, controller_1.getUser)(hashnode_key); + console.log(response); if (response.error) { (0, core_1.setOutput)("result_json", response.data); const summary = `Invalid hashnode_key ${hashnode_key}`; diff --git a/src/index.ts b/src/index.ts index 58f762e..f9a3710 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,11 +18,14 @@ export async function run() { const response = await getUser(hashnode_key); + console.log(response); + if (response.error) { setOutput("result_json", response.data); const summary = `Invalid hashnode_key ${hashnode_key}`; setOutput("result_summary", summary); setOutput("result_info", response.error); + process.exit(1); }