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:
parent
97abafda0d
commit
a8807e8d3c
@ -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)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user