1
0
Fork 0
mirror of https://github.com/fjogeleit/http-request-action.git synced 2024-12-23 12:46:14 +00:00

convert error into string an mark build as failed

This commit is contained in:
Frank 2020-07-19 10:04:58 +02:00
parent d3ea5fce44
commit 4e4ff2b320
3 changed files with 3 additions and 3 deletions

2
dist/index.js vendored
View file

@ -2654,7 +2654,7 @@ const instance = axios.create(instanceConfig);
core.setOutput('response', JSON.stringify(response.data)) core.setOutput('response', JSON.stringify(response.data))
} catch (error) { } catch (error) {
if (error.toJSON) { if (error.toJSON) {
core.setOutput(error.toJSON()); core.setOutput(JSON.stringify(error.toJSON()));
} }
if (error.response) { if (error.response) {

View file

@ -1,6 +1,6 @@
{ {
"name": "http-request-action", "name": "http-request-action",
"version": "1.3.0", "version": "1.3.2",
"description": "", "description": "",
"main": "src/index.js", "main": "src/index.js",
"private": false, "private": false,

View file

@ -58,7 +58,7 @@ const instance = axios.create(instanceConfig);
core.setOutput('response', JSON.stringify(response.data)) core.setOutput('response', JSON.stringify(response.data))
} catch (error) { } catch (error) {
if (error.toJSON) { if (error.toJSON) {
core.setOutput(error.toJSON()); core.setFailed(JSON.stringify(error.toJSON()));
} }
if (error.response) { if (error.response) {