Added option to generate test variations - updated error messages.

This commit is contained in:
2023-06-25 22:18:44 +03:00
parent 15dbe26220
commit c408f2f5b3
4 changed files with 10 additions and 6 deletions
+4 -1
View File
@@ -10013,13 +10013,16 @@ function DataOptions(props = {}) {
errorMessage: null
});
return fetch(url, requestOptions).then(response => response.json()).then(result => {
console.log(result);
if (result.statusCode !== 200) {
throw new Error(result.message);
}
const data = result.variation;
updateState({
dataText: JSON.stringify(data, null, 2),
data
data,
errorMessage: null,
loading: false
});
updateIframe(data);
}).catch(error => {
File diff suppressed because one or more lines are too long
@@ -125,12 +125,13 @@ function DataOptions(props = {}) {
return fetch(url, requestOptions)
.then(response => response.json())
.then(result => {
console.log(result)
if (result.statusCode !== 200) {
throw new Error(result.message);
}
const data = result.variation;
updateState({dataText: JSON.stringify(data, null, 2), data});
updateState({dataText: JSON.stringify(data, null, 2), data, errorMessage: null, loading: false});
updateIframe(data);
})
.catch(error => {