mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
modal error resolves
This commit is contained in:
parent
97abafda0d
commit
a8807e8d3c
@ -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)
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user