modal error resolves

This commit is contained in:
ddejongh 2015-05-27 18:54:45 +02:00
parent 97abafda0d
commit a8807e8d3c
1 changed files with 3 additions and 8 deletions

View File

@ -57,14 +57,9 @@ let ShareForm = React.createClass({
.then((response) => {
if (response.status >= 200 && response.status < 300)
return response
throw new Error(response.statusText)
})
.then((response) => response.json())
.catch((error) => {
this.setState({errors: error});
console.log('request failed', error);
});
response.json().then((response) => this.setState({errors: response.errors}))
}
);
//.then(FetchApiUtils.status)
},