diff --git a/dist/index.js b/dist/index.js index df51b0e..3592ed6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2654,7 +2654,7 @@ const instance = axios.create(instanceConfig); core.setOutput('response', JSON.stringify(response.data)) } catch (error) { if (error.toJSON) { - core.setOutput(error.toJSON()); + core.setOutput(JSON.stringify(error.toJSON())); } if (error.response) { diff --git a/package.json b/package.json index 2b469e7..eae551c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "http-request-action", - "version": "1.3.0", + "version": "1.3.2", "description": "", "main": "src/index.js", "private": false, diff --git a/src/index.js b/src/index.js index 38c535d..ad18ae1 100644 --- a/src/index.js +++ b/src/index.js @@ -58,7 +58,7 @@ const instance = axios.create(instanceConfig); core.setOutput('response', JSON.stringify(response.data)) } catch (error) { if (error.toJSON) { - core.setOutput(error.toJSON()); + core.setFailed(JSON.stringify(error.toJSON())); } if (error.response) {