Remove error from http response
This commit is contained in:
parent
e7e1243fef
commit
68f52aa107
@ -51,7 +51,10 @@ class IntlStartup extends Component {
|
||||
return response.json();
|
||||
})
|
||||
.then((messages) => {
|
||||
this.setState({ messages }, () => {
|
||||
if (messages.statusCode === 506) {
|
||||
this.setState({ appLocale: 'en' });
|
||||
}
|
||||
this.setState({ messages: messages.messages }, () => {
|
||||
baseControls.updateLoadingState(false);
|
||||
});
|
||||
})
|
||||
|
@ -43,8 +43,7 @@ WebApp.connectHandlers.use('/locale', (req, res) => {
|
||||
});
|
||||
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.writeHead(statusCode);
|
||||
res.end(JSON.stringify(messages));
|
||||
res.end(JSON.stringify({ statusCode, messages }));
|
||||
});
|
||||
|
||||
WebApp.connectHandlers.use('/locales', (req, res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user