Added option to generate test variations - updated error messages.
This commit is contained in:
Vendored
+4
-1
@@ -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 => {
|
||||
|
||||
+1
-1
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 => {
|
||||
|
||||
Reference in New Issue
Block a user