Fix JSON serialization in error handling
Replaced steps variable with userInput for JSON serialization in error handling. This ensures that the correct data is saved as a JSON blob when a network error occurs.
This commit is contained in:
parent
857d61e09d
commit
997baae4d3
|
|
@ -25,7 +25,7 @@ const GenericForm = (formData: FormData) => {
|
||||||
body: JSON.stringify(e)
|
body: JSON.stringify(e)
|
||||||
})
|
})
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
let json: string = JSON.stringify(steps);
|
let json: string = JSON.stringify(userInput);
|
||||||
const blob = new Blob([json], {type: "application/json"});
|
const blob = new Blob([json], {type: "application/json"});
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user