Added option to generate test variations - updated error messages.
This commit is contained in:
@@ -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