Skip to content

Commit b48e4a7

Browse files
committed
fix config update error output
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
1 parent 46e3792 commit b48e4a7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

dist/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27445,7 +27445,7 @@ const convertToJSON = (value) => {
2744527445
*
2744627446
* @returns {FormData}
2744727447
*/
27448-
const convertToFormData = (data, files, convertPaths) => {
27448+
const convertToFormData = (data, files) => {
2744927449
const formData = new FormData();
2745027450

2745127451
for (const [key, value] of Object.entries(data)) {
@@ -27666,7 +27666,9 @@ const updateConfig = async (instanceConfig, formData, actions) => {
2766627666
}
2766727667
}
2766827668
} catch(error) {
27669-
actions.setFailed({ message: `Unable to read Content-Length: ${error.message}`, data, files })
27669+
const data = {}
27670+
formData.forEach((k, v) => { data[k] = v })
27671+
actions.setFailed(JSON.stringify({ message: `Unable to read Content-Length: ${error.message}`, formData: data }))
2767027672
}
2767127673
}
2767227674

src/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const convertToJSON = (value) => {
2424
*
2525
* @returns {FormData}
2626
*/
27-
const convertToFormData = (data, files, convertPaths) => {
27+
const convertToFormData = (data, files) => {
2828
const formData = new FormData();
2929

3030
for (const [key, value] of Object.entries(data)) {

src/httpClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const updateConfig = async (instanceConfig, formData, actions) => {
160160
}
161161
}
162162
} catch(error) {
163-
actions.setFailed({ message: `Unable to read Content-Length: ${error.message}`, data, files })
163+
actions.setFailed(JSON.stringify({ message: `Unable to read Content-Length: ${error.message}` }))
164164
}
165165
}
166166

0 commit comments

Comments
 (0)