mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2025-06-06 14:47:57 +08:00
Merge pull request #9 from fjogeleit/fix-invalid-http-error-output
convert error into string an mark build as failed
This commit is contained in:
commit
82c8e38c69
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -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) {
|
||||||
|
@ -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,
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user