add actual error message

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
This commit is contained in:
Frank Jogeleit 2024-10-06 13:39:59 +02:00
parent 04043b9aef
commit 4a50afee6f
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View file

@ -27635,7 +27635,7 @@ const request = async({ method, instanceConfig, data, files, file, actions, opti
if (error.response) { if (error.response) {
actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data })) actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data }))
} else if (error.request) { } else if (error.request) {
actions.setFailed(JSON.stringify({ error: "no response received" })); actions.setFailed(JSON.stringify({ error: "no response received", message: error.message }));
} else { } else {
actions.setFailed(JSON.stringify({ message: error.message, data })); actions.setFailed(JSON.stringify({ message: error.message, data }));
} }

View file

@ -129,7 +129,7 @@ const request = async({ method, instanceConfig, data, files, file, actions, opti
if (error.response) { if (error.response) {
actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data })) actions.setFailed(JSON.stringify({ code: error.response.status, message: error.response.data }))
} else if (error.request) { } else if (error.request) {
actions.setFailed(JSON.stringify({ error: "no response received" })); actions.setFailed(JSON.stringify({ error: "no response received", message: error.message }));
} else { } else {
actions.setFailed(JSON.stringify({ message: error.message, data })); actions.setFailed(JSON.stringify({ message: error.message, data }));
} }