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:
Teriuihi 2024-08-06 22:28:41 +02:00
parent 857d61e09d
commit 997baae4d3

View File

@ -25,7 +25,7 @@ const GenericForm = (formData: FormData) => {
body: JSON.stringify(e)
})
if (!response.ok) {
let json: string = JSON.stringify(steps);
let json: string = JSON.stringify(userInput);
const blob = new Blob([json], {type: "application/json"});
const url = URL.createObjectURL(blob);