1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

modal error resolves

This commit is contained in:
ddejongh 2015-05-27 18:54:45 +02:00
parent 97abafda0d
commit a8807e8d3c

View File

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