mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2024-12-27 04:22:11 -05:00
add actual error message
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
This commit is contained in:
parent
04043b9aef
commit
4a50afee6f
2 changed files with 2 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -27635,7 +27635,7 @@ const request = async({ method, instanceConfig, data, files, file, actions, opti
|
|||
if (error.response) {
|
||||
actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data }))
|
||||
} else if (error.request) {
|
||||
actions.setFailed(JSON.stringify({ error: "no response received" }));
|
||||
actions.setFailed(JSON.stringify({ error: "no response received", message: error.message }));
|
||||
} else {
|
||||
actions.setFailed(JSON.stringify({ message: error.message, data }));
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ const request = async({ method, instanceConfig, data, files, file, actions, opti
|
|||
if (error.response) {
|
||||
actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data }))
|
||||
} else if (error.request) {
|
||||
actions.setFailed(JSON.stringify({ error: "no response received" }));
|
||||
actions.setFailed(JSON.stringify({ error: "no response received", message: error.message }));
|
||||
} else {
|
||||
actions.setFailed(JSON.stringify({ message: error.message, data }));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue